In order to compile a program in C++11 standard we need to do :
g++ -std=c++11 myProgram.cpp -o myProgramExec
But is it possible that i can set the default standard of g++ as C++11, so that i don't have to mention this option again and again Although i can also add an alias for this in my .bashrc :
alias g++='g++ -std=c++11';
But i wonder if there is any better way than this.Is there any config file of g++ which can be edited in order to achieve this? Or is there some easier way to do this?
See Question&Answers more detail:os