解决Dev-C++ [Error] ‘for‘ loop initial declarations are only allowed in C99 or C11 mode

简介: Dev-C++ [Error] ‘for‘ loop initial declarations are only allowed in C99 or C11 mode

在使用 Dev-C++ 编写 C 语言程序时出现:



[Error] ‘for’ loop initial declarations are only allowed in C99 or C11 mode


在 for 循环里声明变量只允许在 C99 或 C11 模式, 需要在工具(Tools)/ 编译选项(complier option)/代码生成下的语言标准选择C99。


结果如下:


目录
相关文章
C++ 编译错误 error: ‘cout‘ was not declared in this scope (摄氏度与华氏度的转换)
C++ 编译错误 error: ‘cout‘ was not declared in this scope (摄氏度与华氏度的转换)
C++ 编译错误 error: ‘cout‘ was not declared in this scope (摄氏度与华氏度的转换)
|
6天前
|
编译器 开发工具 C++
【Python】已解决error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build
【Python】已解决error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build
36 0
|
C++
C++ --- error C2664: “LoadLibraryW”: 不能将参数 1 从“const char *”转换为“LPCWSTR”
C++ --- error C2664: “LoadLibraryW”: 不能将参数 1 从“const char *”转换为“LPCWSTR”
233 0
|
23天前
|
Linux C++
经验分享:C++ error:‘syscall’ was not declared in this scope
经验分享:C++ error:‘syscall’ was not declared in this scope
14 3
|
8月前
|
Linux C++
【C++编译】C++ error:‘syscall’ was not declared in this scope
sys/syscall.h 内部表示,他封装了![[Pasted image 20220818151746.png]] 打开对应的 syscall.h 文件内部依旧没有 syscall()函数的声明。
69 0
|
10月前
|
传感器 IDE 开发工具
排错实战 —— 解决 c++ 工程编译错: error C2059 'string' illegal token on right
排错实战 —— 解决 c++ 工程编译错: error C2059 'string' illegal token on right
|
编译器 C++ 计算机视觉
error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools“
error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft C++ Build Tools“
752 0
|
Oracle 关系型数据库 MySQL
Error:QSqlDatabase: QMYSQL driver not loaded (Qt+C++ 找不到mysql的驱动)
Error:QSqlDatabase: QMYSQL driver not loaded (Qt+C++ 找不到mysql的驱动)
170 0
Error:QSqlDatabase: QMYSQL driver not loaded (Qt+C++ 找不到mysql的驱动)
|
关系型数据库 MySQL C++
fatal error C1189: #error: STL1003: Unexpected compiler, expected C++ compiler
fatal error C1189: #error: STL1003: Unexpected compiler, expected C++ compiler
299 0
|
编译器 Linux C++
当你安装包遇到【 error: Microsoft Visual C++ 14.0 or greater is required】怎么办?
当你安装包遇到【 error: Microsoft Visual C++ 14.0 or greater is required】怎么办?
899 0