g++ -std=c++11 -o test test.cpp
或者:
sudo vim ~/.bashrc
在some more ls aliases
注释块的地方添加下面这两行:
alias g++11='g++ -g -Wall -std=c++11'
alias g++14='g++ -g -Wall -std=c++14'
source ~/.bashrc
g++11 -o test test.cpp
https://www.cnblogs.com/jhj117/p/6117204.html