home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / CH06 / A06211.WAV (.mp3) < prev    next >
Waveform Audio File Format  |  1993-10-21  |  421.1 KB  |  1 channel  |  11,025 sample rate  |  39 seconds
Transcription: The structure, Shrink, has three data members packed into eight bits of memory. To declare a member as a bit field, do not specify a type before its name. The name is followed by a colon and the number of bits in that field. In this example, the member 1 occupies one bit. The member 2 occupies two bits, and the member 3 occupies five bits. Each bit field is of integral type, and you can declare it to be signed or unsigned. Whether the default is signed or unsigned depends on your C++ implementation. Here you know only that the member 1 does not include a sign.