&= and |=
http://www.cplusplus.com/reference/iostream/ios_base/fmtflags/
1 2 3
|
ff &= ~cout.basefield; // unset basefield bits
ff |= cout.hex; // set hex
ff |= cout.showbase; // set showbase
|
what with &= and |= what do they mean ?
They're the compound assignment variants of & and |.
some simple example would be greatly appreciated
1 2 3
|
a |= b; a or_eq b; a = a bitor b;
a &= b; a and_eq b; a = a bitand b
~a; compl a;
|
Where bit(op) is the 'op' aplied bit to bit.
Topic archived. No new replies allowed.