The only command for yum to install g++ on CentOS is the following:
yum install gcc-c++
You might also want to install it with some more useful packages. Then your command will be:
yum install gcc-c++ compat-gcc-32 compat-gcc-32-c++
Hope this helps you to install g++ under CentOS