The easiest way to do this is using rpm tool.

All the tools needed could be found here: http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/ezinstall.html

Once you are root type:
# rpm -ivv ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/gcc/libgcc-4.2.0-3.aix5.3.ppc.rpm
# rpm -ivv ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/gcc/libstdcplusplus-4.2.0-3.aix5.3.ppc.rpm
# rpm -ivv ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/gcc/libstdcplusplus-devel-4.2.0-3.aix5.3.ppc.rpm
# rpm -ivv ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/gcc/gcc-4.2.0-3.aix5.3.ppc.rpm
# rpm -ivv ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/gcc/gcc-cplusplus-4.2.0-3.aix5.3.ppc.rpm

Once you have done this try compile and link a simple source code like this.

try to compile and link:
root@wizchePPC/wizche# g++ test.cpp -o test  
 collect2: library libm not found
root@wizchePPC/wizche#

Ops it didn't work, fileset bos.adt.libm is needed, to install it you have to insert the first AIX DVD into your drive and  go to the ppc (should be /mount/youdvd/installp/ppc) directory and type:

root@wizchePPC/mnt/cdrom/# smitty install_all
 
Under SOFTWARE to install press F4 and choose:

Press enter and wait until smitty finish the installation...
(I've first tried with the PREVIEW mode in order to see if any error occurs, just turn to "no" if you are sure about it)

Now you may retry to compile the source code:

root@wizchePPC/wizche# g++ test.cpp -o test

root@wizchePPC/wizche# ./test
Hello World!

root@wizchePPC/wizche#      

If you're more comfortable with the command line you could directly type the install command:
#  /usr/lib/instl/sm_inst installp_cmd -a -l -d '.' -f '@ 5.3.11.0  Base Application Development Math Library @@I:bos.adt.libm  5.3.11.0'  '-c' '-N' '-g' '-X'     '-Y'