码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2015-12-20 08:12:39      阅读:250      评论:0      收藏:0      [点我收藏+]

标签:

  出现错误:

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 

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

标签:

原文地址:http://www.cnblogs.com/yitianxi/p/5060232.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!