struct B { char a:4; //a这个成员值占了4bit char b:2; char c:2; }
占了1个字节
struct B { int a:4; //a这个成员值占了4bit char b:2; char c:2; }
占了8个字节
控制LED灯的结构体:
struct E { char a1:1; char a2:1; char a3:1; char a4:1; char a5:1; char a6:1; char a7:1; char a8:1; }
struct B { char a:4; //a这个成员值占了4bit char b:2; char c:2; }
占了1个字节
struct B { int a:4; //a这个成员值占了4bit char b:2; char c:2; }
占了8个字节
控制LED灯的结构体:
struct E { char a1:1; char a2:1; char a3:1; char a4:1; char a5:1; char a6:1; char a7:1; char a8:1; }