How to run an executable in the current directory

For security reasons, the current directory is NOT in your path. This means that if
you wish to run the executable hello that is in the same directory that you
are in, you must type: ./hello. This says to explicitly run the hello
executable that is in the current directory.

Compile a C program with gcc

The gcc command is used to invoke the GNU C compiler. Both input
source file and executable file name must be specified. This is the command
to use if you have a C source file called hello.c and wish to
create the executable file hello.

gcc hello.c -o hello

If you are including <math.h> do not forget to put the -lm
at the end of the compile line.

Compile a C++ program with g++

The g++ command is used to invoke the GNU C++ compiler. Both input
source file and executable file name must be specified. This is the command
to use if you have a C++ source file called hello.cpp and wish to
create the executable file hello.