BGNG
New member
I've been looking through a piece of code written in C++ that I consider to be particularly valuable, but I'm not sure what every syntaxual component means. I know quite a bit, but this is beyond my experience and I cannot find documentation on it anywhere.
I'm seeing the circumflex used in the ^ and ^= operators, but last time I checked, the exp() function was required to do exponents... What use does this symbol have in C++? (Example: x ^= y ^ z
I also see a vertical seperator used in the | operator, but from what I can tell, the OR operator is written as ||. What might | be? (Example: x = (y | z)
Lastly, I'm finding use of a tilde in a numeric expression. I have no clue what this does. Anyone know? (Example: unsigned int x = ~0
Any guidence will be appreciated.
I'm seeing the circumflex used in the ^ and ^= operators, but last time I checked, the exp() function was required to do exponents... What use does this symbol have in C++? (Example: x ^= y ^ z
I also see a vertical seperator used in the | operator, but from what I can tell, the OR operator is written as ||. What might | be? (Example: x = (y | z)
Lastly, I'm finding use of a tilde in a numeric expression. I have no clue what this does. Anyone know? (Example: unsigned int x = ~0
Any guidence will be appreciated.
Last edited: