#include <stdio.h>typedef struct{int a:2;int b:2;int c:1;}test ;void main(){test t;t.a = 1;t.b = 3;t.c = 1;printf("%d\n",t.a);printf("%d\n",t.b);printf("%d\n",t.c);}
1 回答
qq_遁去的一_1
TA贡献1725条经验 获得超7个赞
typedef struct
{
unsigned int a:2;
unsigned int b:2;
unsigned int c:1;
}test ; //改成无符号数试试
- 1 回答
- 0 关注
- 129 浏览
添加回答
举报
0/150
提交
取消