结构体位字段
#include <stdio.h>
typedef struct
{
int a:2;
int b:2;
int c:1;
}test;
int main (void)
{
test t;
t.a = 1;
t.b = 2;
t.c = 1;
printf("%d,",t.a);
printf("%d,",t.b);
printf("%d,\n",t.c);
return 0;
}
INFO
#include <stdio.h>
typedef struct
{
int a:2;
int b:2;
int c:1;
}test;
int main (void)
{
test t;
t.a = 1;
t.b = 2;
t.c = 1;
printf("%d,",t.a);
printf("%d,",t.b);
printf("%d,\n",t.c);
return 0;
}