【问题标题】:can not include std array in dev c++ 5.9不能在 dev c++ 5.9 中包含 std 数组
【发布时间】:2015-05-15 21:07:08
【问题描述】:

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

32  2   c:\program files (x86)\dev-cpp\mingw64\lib\gcc\x86_64-w64-mingw32\4.8.1\include\c++\bits\c++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++。任何帮助表示赞赏。

谢谢

【问题讨论】:

  • 好吧,如错误所示,您必须使用编译器标志启用对 C++11 的支持。你试过了吗?

标签: c++ c++11 dev-c++


【解决方案1】:

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

#error 此文件需要对 ISO C++ 2011 标准的编译器和库支持。这种支持目前是实验性的,必须 使用 -std=c++11 或 -std=gnu++11 编译器选项启用

阅读您的 IDE 文档以了解如何执行此操作或参考此图片。

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

【讨论】:

  • 非常感谢。有效。我昨天刚开始学习 c++,所以对我来说任何东西都是新的。
【解决方案2】:

在 DEV C++ 中,工具

【讨论】:

    【解决方案3】:

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

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-12-23
      • 1970-01-01
      • 2011-11-06
      • 1970-01-01
      • 1970-01-01
      • 2013-01-25
      • 2019-10-31
      相关资源
      最近更新 更多