gcc options... source files...
Read the man page for gcc and g++ for additional information.
Examine these simple C examples.
Also, these books may be useful:
Where some useful options are:
For example, to compile a file called prog.c, use the command
gcc -O2 prog.c
which would compile prog.c with the highest level of optimization,
and save the result in the executable a.out.
Using C++
Actually, gcc supports both C and C++.
If you wish to compile a C++ program, use 'g++' instead of gcc, and
use the '.cpp' or '.C' extension instead of the '.c' extension.
The same options as above may be used.