Here is a code
quadratic.cc that calculates roots of a
quadratic according to the method discussed above.
Compile the code with the command
g++ quadratic.cc -o quadratic -lm
Note the extra
-lm. (Lower case ``l'' as in
``library''.) This linker ``option'' or ``flag'' calls in routines
from the math library. In this code we need the
function that appears in the math library. Try compiling without this
flag so you can become familiar with linker error messages, which you
will doubtless see again!