compile c++ file code example
Example 1: compile c++ program
$ g++ -o <name-you-want-to-give> source.cpp
$ ./myprogram
Example 2: c++ compile to exe command line
gcc sourcefile_name.c -o outputfile.exe
$ g++ -o <name-you-want-to-give> source.cpp
$ ./myprogram
gcc sourcefile_name.c -o outputfile.exe