在实验中要用到C11标准中的<std::future>异步执行,编译时出现如下错误
.\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\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.
解决方法:
菜单栏>>工具>>编译选项>>编译时加入如下命令 (勾选√)
-std=c++11
确定后再次编译程序,编译通过