初始化结构体中 数据位大小
1
struct Date {
2
unsigned nWeekDay : 3; // 0..7 (3 bits)
3
unsigned nMonthDay : 6; // 0..31 (6 bits)
4
// unsigned : 0; // Force alignment to next boundary.
5
unsigned nMonth : 5; // 0..12 (5 bits)
6
unsigned nYear : 8; // 0..100 (8 bits)
7
};
8
struct Date {2
unsigned nWeekDay : 3; // 0..7 (3 bits)3
unsigned nMonthDay : 6; // 0..31 (6 bits)4
// unsigned : 0; // Force alignment to next boundary.5
unsigned nMonth : 5; // 0..12 (5 bits)6
unsigned nYear : 8; // 0..100 (8 bits)7
};8



浙公网安备 33010602011771号