SPHERE
We can create an executable with the following command at the prompt:
>CC -o sphere main.cxx
This compiles the program main.cxx
into the object main.o.
The compiled object main.o
is then linked with any required libraries to form an executable.
Standard libraries, such as the one that executes the code for
the ostream.h class cout,
are usually included by default.
The option -o
indicates the desired name of the executable, sphere,
and the object file main.o
is removed.
The program is executed as follows:
>sphere
mySphere has radius: 10.0