Out of interest, why did you install Red Hat 9? It's obsolete, so really you should get rid of it and install something newer.
As for compiling C++ programs, the standard compiler is g++, which is part of the GNU Compiler Collection. You can compile a program in stuff.cc with "g++ stuff.cc -o stuff". The -o specifies the output file and if it is not given, the executable will be called a.out. If you need to link other libraries, there are flags to do so.