HS> This should expand your knowledge abit..
HS>
HS> struct bit_field
HS> {
HS> int bit0 : 1;
HS> int bit1 : 1;
HS> int bit2 : 1;
HS> int bit3 : 1;
HS> int bit4 : 1;
HS> int bit5 : 1;
HS> int bit6 : 1;
HS> int bit7 : 1;
CC> Why not do bit-wise manipulation and create a bit_array class?
CC> Allocate a buffer of char (you may have 7 wasted bits) and calculate
CC> which character has the 31st bit and the offset of that bit within
CC> that char. Overload the [] operator and walla: You can know store
CC> 8 boolean values per character. 800 booleans = 100 bytes(?)
That is what I did.
... A pedestrian hit me and went under my car.
--- Ezycom V1.48g0 01fd016b
---------------
* Origin: Fox's Lair BBS Bris Aus +61-7-38033908 V34+ Node 2 (3:640/238)
|