bool类型

错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__

ε祈祈猫儿з 提交于 2020-10-28 08:47:06
今天在向一段代码中添加CRC校验代码时,出现了如下的编译错误: checking.c: 在函数‘get_int’中: checking.c:16: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token checking.c:52: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token checking.c:67: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token checking.c:78: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token checking.c:97: 错误:原型函数定义中使用了旧式参数声明 checking.c:97: 错误:expected ‘{’ at end of input 是在学习c primer plus第八章的时候8.6 输入确认的时候提示的错误。 引申:以下的这些错误原因是网上看到的,整理一下 1.原因:用gcc编译cpp文件。解决:用g++编译cpp文件 注:用Makefile很容易误用gcc的