Skip to content

Latest commit

 

History

History
15 lines (14 loc) · 529 Bytes

File metadata and controls

15 lines (14 loc) · 529 Bytes

cpp_basic

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.

To run a cpp program in linux

$ 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).