error报错解决

(1)

复制一段代码,出现下面报错
test_int:19: error: stray '\200' in program

test_int:19: error: stray '\200' in program

test_int:19: error: stray '\343' in program

test_int:19: error: stray '\200' in program

test_int:19: error: stray '\200' in program

test_int:21: error: stray '\343' in program

这个错误是由于使用了中文引号或其他全角符号,还有一种就是有中文的空格(这个不容易观察),需调到顶格处,再用tab即可。

可通过调整格式来解决问题,代码不多的话可以自己在code一遍

(2)

'for' loop initial declarations are only allowed in C99 or C11 mode

在for循环里声明变量只允许在C99或C11模式, 需要在工具(Tools)/编译选项(complier option)/代码生成下的语言标准选择C99

(3)

conflicting tyes for...

函数使用的位置位于声明之前,或未声明函数原型就使用函数;

这种情况往往出现在函数实现文件中,未在头部声明或声明的位置位于函数使用的位置之后;

解决办法:

将函数声明放到文件靠前位置;

posted @ 2021-12-07 21:31  泰勒斯儿童营养牙膏  阅读(762)  评论(0)    收藏  举报