SYMBOL CARET

Hello, I wanted to ask a question?
Is the symbol "^" or caret is a valid operator in c++? Reason? As for me, I think it is valid, because the symbol itself represent as the pointer to another variable and yet can be defined by c++. What about yours..?
It's XOR in C, C++ and C#.
closed account (z05DSL3A)
farahani wrote:
Is the symbol "^" or caret is a valid operator in c++? Reason? As for me, I think it is valid, because the symbol itself represent as the pointer to another variable and yet can be defined by c++. What about yours..?
Me much with the not understanding.
The ^ is the bitwise XOR operator (exclusive OR) . A bitwise operator is used when working with individual bits and are used to mask bits together. The bitwise operators include:

& bitwise AND
| bitwise OR
^ bitwise XOR
~ (unary) bitwise NOT

I suggest you read up on that. Check the Tutorials section on this site.
Topic archived. No new replies allowed.