1.Project settings
project右键-> properties->c/c++ build ->Settings -> GCC C++ Compiler -> Miscellaneous -> Other flags后面加上 -std=c++11
2.Workspace settings
Window-> Preference -> Build -> Settings ->Discovery -> CDT GCC Built-in Compiler Settings MinGW(shared) ->(command to get compiler specs) COMMAND−E−P−v−dD" {INPUTS}” -std=c++11