在實驗中要用到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
確定后再次編譯程序,編譯通過