大伙帮忙看看 这个位结构体的错误!!

2019-07-27 16:56发布

1111.jpg
定义结构体之后    使用出现错误  


2222.jpg


错误提示

Error[Pe136]: struct "bit" has no field "bit" d:我的文档桌面RFkard.c 8


友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
8条回答
dirtwillfly
2019-07-28 06:36
你对结构体的使用方法有问题
一般定义一个结构体:
struct bs

{

unsigned a: 1;

unsigned b: 3;

unsigned c: 4;

}bit;

可以对结构体的成员进行操作:
bit.a = 1;

bit.b = 7;

bit.c = 15;

一周热门 更多>