1.错误类型:
error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
解决办法:
使用带参数命令进行编译:指定编译器版本
g++ -std=c++11 -o2 -o a.out test.cpp
1.错误类型:
error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
解决办法:
使用带参数命令进行编译:指定编译器版本
g++ -std=c++11 -o2 -o a.out test.cpp