c: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token

可能会犯的一些个错误;

定义struct,虽然脑子里有这个关键字,可是没有敲到实际代码中,导致这个错误;这个错误提示也很全面,说大括号前面缺东西,可能缺 等号,逗号,分号,asm 或者是 attribute, 都不在点上。

error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘{’ token
warning: data definition has no type or storage class
} ABC;

typedef abc {
int a;
int c;
} ABC;

猜你喜欢

转载自blog.csdn.net/qq_36428903/article/details/126007464