I was going through some VC++ code in a large code-base and came across this:
if (nState & TOOL_TIPS_VISIBLE)
nState &= ~TOOL_TIPS_VISIBLE;
else
nState |= TOOL_TIPS_VISIBLE;
break;
Is there any such operator as &= or |= in C++? What is it for?
Is it the equivalent of nState = nState & ~TOOL_TIPS_VISIBLE?
x &= yis the same asx = x & yx |= yis the same asx = x | y