This is a repo for my journey into the world of C++ from various online resources, like the Codeacademy C++ course, Introduction to C++ by Microsoft in edx.org, etc.
$ g++ -O2 <CppProgram> -o <outputFileName>
$./<outputFileName>
eg. To run hello.cpp in the terminal, type:
$ g++ -O2 hello.cpp -o hello
$ ./hello
Hello World!
Here, g++ is the compiler, -O2
is an option for optimization of the program (not necessarily important but is good to use).