初始化结构体中 数据位大小

1struct 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
posted @ 2009-04-13 13:04  狼窝  阅读(177)  评论(0编辑  收藏  举报