这些语句声明了Bit字段.
它意味着占用1位的存储器而c占用3位的存储器.
Both C and C++ allow integer members to be stored into memory spaces smaller than the compiler would ordinarily allow. These space-saving structure members are called bit fields,and their width in bits can be explicitly declared. Bit fields are used in programs that must force a data structure to correspond to a fixed hardware representation and are unlikely to be portable.
The syntax for declaring a bit field is as follows:
>>-type_specifier–+————+–:–constant_expression–;—><
‘-declarator-‘
A bit field declaration contains a type specifier followed by an optional declarator,a colon,a constant integer expression that indicates the field width in bits,and a semicolon. A bit field declaration may not use either of the type qualifiers,const or volatile.