compile cpp with specific version

Compiling C++ with Specific Version

g++ -std=c++11 -o output_file input_file.cpp
  • Explanation:
  • g++: This is the GNU C++ compiler.
  • -std=c++11: This flag tells the compiler to use the C++11 standard.
  • -o output_file: This specifies the name of the output file.
  • input_file.cpp: This is the name of the input C++ source file.