Win32 |

Started by
3 comments, last by Tazel 21 years, 3 months ago
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)
tcacheContact Me-----------AH! MY BRAIN IS GOING TO SELF-DETONATE! -- Yours Truly (Jan, 2003)
Advertisement
The | is a bit-wise OR operator whereas || is a logical OR operator
Ok say you have two flags. FlagA and FlagB

In binary they look like:

FlagA: 10000000
FlagB: 00000001

FlagA | FlagB == 10000001
yep, this is useful for things like cohen sutherland clipping.
yep, this is useful for things like cohen sutherland clipping.

This topic is closed to new replies.

Advertisement