理论知识参考:https://blog.csdn.net/birdzb/article/details/1821843
#include
struct bitmap{
int a:2;
unsigned int b:4;
int :2;
int c:6;
unsigned int d:2;
};
int main(int argc ,char ** argv)
{
struct bitmap tmp;
tmp.a=1;
tmp.b=8;
tmp.c=20;
tmp.d=0x3;
printf("%d,%d,%d,%d
",tmp.a,tmp.b,tmp.c,tmp.d);
}