C++编程遇到以上问题,主要原因是指令没有引入c++11支持
那如何让自己的Dev C++用上C++11标准
首先确保Dev C++版本是最新的5.11版
其次 打开最上角菜单栏——工具——编译选项
附-std=gnu++11 与 -std=c++11 有什么区别?
参考 C++ Standards Support in GCC
This mode can be selected with the -std=c++11 command-line flag, or -std=gnu++11 to enable GNU extensions as well.
-std=c++11,支持C++11标准;
-std=gnu++11,支持C++11标准和GNU扩展特性;
比如,GNU extensions to the C and C++ languages