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
本文介绍了解决在C99模式下使用for循环声明变量时出现的错误的方法。当编译器不支持C99标准时,会出现错误提示。文章提供了具体的设置步骤,指导用户如何在编译器中启用C99标准。
7198

被折叠的 条评论
为什么被折叠?



