Stuff I'm working on.

Sunday, 18 August 2013

Compiling & Running C++ 11 in Ubuntu

With either G++ or Clang++ (Or the compiler of your choice), in the console navigate to your "main.cpp" and write as follows:

g++ main.cpp -std=c++11
clang++ main.cpp -std=c++11

Then you should have a file called "a.out".

To make the file executable, run this command:

chmod +x a.out

Finally to run, execute this:


No comments:

Post a Comment