I
Ignacio X. Domínguez
Hi. I'm using the | operator to use multiple flags in a variable. For
example:
const int flag1 = 0x00000001;
const int flag2 = 0x00000002;
const int flag3 = 0x00000004;
int Flags = flag2 | flag4 | flag1;
Now I would like to remove flag2 from Flags without having to assign the
other flags (since I'm not sure which are enabled). I believe it's something
like
Flags = Flags (operator) flag2;
but i'm not sure about the operator.
Thanks in advance.
example:
const int flag1 = 0x00000001;
const int flag2 = 0x00000002;
const int flag3 = 0x00000004;
int Flags = flag2 | flag4 | flag1;
Now I would like to remove flag2 from Flags without having to assign the
other flags (since I'm not sure which are enabled). I believe it's something
like
Flags = Flags (operator) flag2;
but i'm not sure about the operator.
Thanks in advance.