【发布时间】:2012-11-05 04:53:20
【问题描述】:
我理解在 C 中,运算符 ^ 用于按位异或。在其中一个 C++ 代码中,我看到了使用此运算符的以下行:
using namespace System::Threading;
public ref class Expert : public System::Windows::Forms::Form
{
int i ;
float a ;
public:
int count;
Thread^ th;
}
这里的^是什么意思?
【问题讨论】:
-
那不是 C++,它是 C++/CLI,它是 C++ 的 Microsoft 扩展。
-
这意味着代码不是C++,而是微软的一种类似的语言。 (我忘记了语言的名称,但里面有 C++。)
-
在 C++ 中(如在 C 中),它是按位异或 (XOR) 运算符。在您的问题的上下文中,它是完全不同的东西,而不是 C++。