I would suggest making sure that all the underlying libraries and packages are up to date. Try it this way:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install g++
If you haven't done the update/upgrade for a while, your system might be too uncooperative to accept the proposed new stuff...