If you have your Fedora CDs, you can use the install programs feature to grab working versions of gcc and g++. I think they are in the "development" section.
If you need the latest versions, you can then apt-get (or synaptic if you choose to get that) or yum to upgrade the gcc and g++ versions that you already have.
|