DEV-C++報Error如
[Error] 'for' loop initial declarations are only allowed in C99 mode
[Note] use option -std=c99 or -std=gnu99 to compile your code
1.
2.
step1 工具->編譯選項->編譯器選項卡中,在"編譯時加入以下命令"復選框前打鈎,里面輸入命令 -std=c99 (與GCC不同,這里c99中的字母c是小寫)
step2 工具->編譯選項->代碼生成/優化選項卡中,在C編譯器->支持所有ANSI C標准上選NO
-std=c99
參考資料
https://blog.csdn.net/artechtor/article/details/1788699