Quote:
Originally Posted by Pimp Daddy
ok here is a question... lets say I get an offset and it contains like
(1<<1) | (1<<2) | (1<<3)
And I just want to set the (1<<1) to 0 ((0<<1))...
How would I do this?
|
The ~ (bitwise not) is what's needed to remove a flag.
So assuming (int) offsetValue has been set prior to this:
offsetValue &= ~(1<<1)