• Advertisement

Archived

This topic is now archived and is closed to further replies.

Win32 |

This topic is 5517 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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)

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
The | is a bit-wise OR operator whereas || is a logical OR operator

Share this post


Link to post
Share on other sites
Ok say you have two flags. FlagA and FlagB

In binary they look like:

FlagA: 10000000
FlagB: 00000001

FlagA | FlagB == 10000001

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
yep, this is useful for things like cohen sutherland clipping.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
yep, this is useful for things like cohen sutherland clipping.

Share this post


Link to post
Share on other sites

  • Advertisement