TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: RICK BISCHOFF
from: HERMAN SCHONFELD
date: 1997-03-23 09:15:00
subject: Bit Fields

RB>Does anyone know how to declare a variable that holds only one bit of
RB>information.. (You know only two values (0 or 1)) ???
struct  bit_field {
        int bit_1        : 1;
        int bits_2_to_5  : 4;
        int bit_6        : 1;
        int bits_7_to_16 : 10;
} bit_var;
... Itsdifficulttobeverycreativewithonlyfiftysevencharacters.
--- Ezycom V1.48g0 01fd016b
---------------
* Origin: Fox's Lair BBS Bris Aus +61-7-38033908 V34+ Node 2 (3:640/238)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.