What is the meaning of ^

I have see some code with ^character...
What it is for ?
(maybe it was a basic c++ question....)
Thanks
In C++, this is the bitwise XOR operator. See http://www.cplusplus.com/doc/tutorial/operators/

Be aware that in C# it has another usage.
closed account (z05DSL3A)
The bitwise XOR (exclusive or) operator (^) also takes two integral operands. For each bit position, the result is 1 if either but not both operands contain 1; otherwise, the result is 0.

result = b1 ^ b2;

Or C++/CLI
http://www.cplusplus.com/forum/general/36226/#msg195978

Edit:
Be aware that in C# it has another usage.

Logical XOR.
Last edited on
No....
I see this declaration List<String^>
closed account (z05DSL3A)
Follow the C++/CLI link.

The That is from it is C++/CLI[1] not C++. It is a "handle" to a .net reference type.

[1] http://en.wikipedia.org/wiki/C%2B%2B/CLI

Edit:
I seem to be having a bad day constructing sentences.
Last edited on
Ok ! Thanks
Topic archived. No new replies allowed.