Re: Crash when using bitset

From: Karl B Buchner (
Date: 02/09/02

>    Well, your problem is pretty straightforward:
>    You have 8 bits and you're trying to see whether number 16 is
> set.

So flags.test(x) will test (1<<x), and not x?
What about |= operator and such?
In other words, do some of the bitset funcs and operators
take the number of the bit and others the bit itself?
if i wanted to test both bit #4 and bit #5 would i have
to do two checks (flags.set(4) || flags.set(5)) instead of
the one for standard bitvectors (IS_SET((1 << 4) | (1 << 5)))?

sorry if its a bit question laden, but I'm prety new to c++

Juno offers FREE or PREMIUM Internet access for less!
Join Juno today!  For your FREE software, visit:

   | FAQ: |
   | Archives: |
   | Newbie List:   |

This archive was generated by hypermail 2b30 : 06/25/03 PDT