How to compile c++ 11 program on Linux. C++ 11 programs can not be compiled the way we compile C++ program (older than c++11).  Let see how c++11 program is compiled on Linux terminal with g++ compiler. Let us write a very simple c++ 11 program.


int main()
// Specifies that the type of the variable that
//is being declared will be automatically
// deduced from its initializer
auto a = 3;
return 0;

Open terminal and compile program ( run below command , assuming the above program is saved as main.cpp) 

#g++ -std=c++11 main.cpp -o main

How to compile c++ 11 program on Linux

Video tutorial for c++11 compilation

Related Contents to follow