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 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM