Hello, dear Herman!
Sunday March 23 1997 09:15, Herman Schonfeld wrote to Rick Bischoff:
RB>> Does anyone know how to declare a variable that holds only one bit
RB>> of information.. (You know only two values (0 or 1)) ???
HS> struct bit_field {
HS> int bit_1 : 1;
^
HS> int bits_2_to_5 : 4;
^^^ ^
HS> int bit_6 : 1;
^^^ ^
HS> int bits_7_to_16 : 10;
^^^
HS> } bit_var;
I'm afraid, it wrong. First three lines requred comma (',') instead of
semicolon (';'), then, type declarations ("int") in last lines must be
sent.
Alexander
--- GoldED/2 2.50+
---------------
* Origin: Frankenstain Point (2:463/16.100)
|