Re: Crash when using bitset

From: Karl B Buchner (zerker@juno.com)
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++

^Blaize^
________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today!  For your FREE software, visit:
http://dl.www.juno.com/get/web/.

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



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