错误
草原面朝大海
技术的力量
展开
-
error: 'for' loop initial declarations are only allowed in C99 mode
参照Linux程序设计 第四版 P5 上的说明,在POSIX兼容的系统中,C 语言编译器被称为 c89 详见 http://blog.csdn.net/imyang2007/article/details/8296331 使用gcc编译代码是报出 error: 'for' loop initial declarations are only allowe转载 2013-03-31 20:46:53 · 1342 阅读 · 0 评论 -
error: expected declaration or statement at end of input
Linux编程时,有时候会报这个错误,很蛋疼,因为编译器不会告诉你具体在哪里出错了。。。 如下几种原因都可能会导致这个错误: 1)程序在哪个地方缺失了一个括号。 检测方法如下,如果你是用VIM编程的话,可以用%去一个个匹配下括号,我是这么配出来的 2)变量没有申明原创 2013-04-05 01:06:06 · 8023 阅读 · 0 评论