How does the | connect flags? In TOTWGPG, LaMothe refers to them as "logically ORing" the flags together? Isn''t or || not | ? I''ve never seen | in use with C++. Can anyone explain this to me?
tcache
Contact Me
-----------
AH! MY BRAIN IS GOING TO SELF-DETONATE! -- Yours Truly (Jan, 2003)
Ok say you have two flags. FlagA and FlagB
In binary they look like:
FlagA: 10000000
FlagB: 00000001
FlagA | FlagB == 10000001
In binary they look like:
FlagA: 10000000
FlagB: 00000001
FlagA | FlagB == 10000001
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement