error: 'for' loop initial declarations are only allowed in C99 mode

  出现错误:

error: 'for' loop initial declarations are only allowed in C99 mode

note: use option -std=c99 or -std=gun99 to comple your code

 

  原因:所采用的代码格式是C99规范,而当前解释器不符合。

  

  解决办法:

Settings

-> Compiler and debugger settings

-> Global compiler settings

-> Other options

-> 在编辑框中输入:-std=c99

-> OK 

posted @ 2015-12-20 07:45  易天曦小盆友  阅读(6383)  评论(1编辑  收藏  举报