出現錯誤:
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