error: 'for' loop initial declarations are only allowed in C99 mode
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
作者:柒月
Q群 :2122210(嵌入式/机器学习)