不能在 Dev C++ 5.9 中包含 std 数组

can not include std array in dev c++ 5.9

本文关键字:包含 std 数组 Dev C++ 不能      更新时间:2023-10-16

我想在 DEv C++ 5.9 中包含数组,但它给出了一个错误:

32  2   c:program files (x86)dev-cppmingw64libgccx86_64-w64-mingw324.8.1includec++bitsc++0x_warning.h    [Error] #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.

这是因为我正在使用的 DEV-C++ 版本还是我的计算机 IOS?我使用了其他版本的 DEV C++但由于我的计算机上有 Windows 8,因此它们无法处理,我需要使用此版本的 DEV C++。任何帮助,不胜感激。

谢谢

错误消息会告诉您如何修复错误。

#error 此文件需要编译器和库支持 ISO C++ 2011 标准。此支持目前处于实验阶段,必须 使用 -std=c++11 或 -std=GNU++11 编译器选项启用

阅读 IDE 文档以了解如何执行此操作或参考此映像。

http://www.cplusplus.com/doc/tutorial/introduction/devcpp/devcpp2.png

在 DEV C++ 中,工具<<将编译器设置为调试/发布 <<设置<<代码生成<<语言标准 (-std) <<ISO C++11 或 GCC C++11(无论您使用什么),<<使用调试/发布您之前使用的任何内容来编译您的 std::array 代码。

这是因为我正在使用的 DEV-C++ 版本还是我的 电脑IOS?

否,这取决于C++编译器版本。
正如错误所说:

此文件需要 ISO C++ 2011 的编译器和库支持 标准。