Skip to main content
gamedev.net
🔒 Locked

using bit flags

Started by original vesoljc Dec 1, 2002 at 7:46 PM 3 replies 350+ views
Original Post
original vesoljc
original vesoljc
if using bit flags with bitwise operators, how do we have more than 64 bits on one "variable"? ie: uint64 status_flags = 0; FLAG1 0x0000000 FLAG2 0x0000001 FLAG3 0x0000002 FLAG4 0x0000004 FLAG5 0x0000008 FLAG6 0x0000010 ... FLAG63 0x8000000 status_flags = status_flags | FLAG2; if(status_flags & FLAG2) { } so how to go bigger and/or is there a better way to handle flags?
Abnormal behavior of abnormal brain makes me normal...
Evil Bill
Evil Bill
Look into std::bitset.

Member of the Unban Mindwipe Society (UMWS)
original vesoljc
original vesoljc
Deyja: probablly not, but if i needed 65 of them i''d go crazy
Abnormal behavior of abnormal brain makes me normal...

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.