Just apt-get install gcc g++ directly under debian.
According to similar logic, yum install gcc g++ under Fedora reports that the g++ package cannot be found.
A bit worse, the original name of this package is gcc-c++. The complete should be yum install gcc gcc-c++ .
Note that you must be the root user before installing.