DevC++如何支持C++11

今天在写代码时用 u n o r d e r e d _ m a p unordered\_map unordered_map时出现了的问题,报了以下错误。

#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.

从网上得知是DevC++没支持C++11
解决方法也很简单:
1.点击工具
DevC++如何支持C++11_第1张图片
2.点击Compiler Options
DevC++如何支持C++11_第2张图片
3.-std=c++11并添加DevC++如何支持C++11_第3张图片
4.确认即可
DevC++如何支持C++11_第4张图片

你可能感兴趣的:(DevC++如何支持C++11)