g++ and gcc may be in a package called gcc-c++

Scientif Linux or Fedora (both are Redhat based)
have a combined packed for gcc and g++, which is called gcc-c++.

Try to install it, when gcc is missing