linux系统中在使用unordered_map时,报如下错误:
#error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.
解决方法:在编译加上-std=c++0x或者-std=gnu++0x就行了。
比如:g++ -std=c++0x -o hello hello.cpp,即可生成hello的可执行文件。
#error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.
解决方法:在编译加上-std=c++0x或者-std=gnu++0x就行了。
比如:g++ -std=c++0x -o hello hello.cpp,即可生成hello的可执行文件。