Like the title says, I want to make a variable in my classes that I can pass bitwised flags to like I have seen in OpenGL. So I can do stuff like:
... Or something like that.
I'm assuming I need to use a struct or something but I tried that and it didn't work so I'm wondering how anyone else has done/would do it. Thanks in advance.
class Dude { protected: ThisIsTheVariable flag; // blah blah } Dude.flag = EATING | BREATHING | ALIVE;
... Or something like that.
I'm assuming I need to use a struct or something but I tried that and it didn't work so I'm wondering how anyone else has done/would do it. Thanks in advance.