g++ and gcc version in Ubuntu
check version
gcc --version
g++ --version
Install version
sudo apt-get install -y gcc-4.7
sudo apt-get install -y g++-4.7
Update version
cd /usr/bin
sudo rm gcc
sudo ln -s gcc-4.7 gcc
sudo rm g++
sudo ln -s g++-4.7 g++
check version
ls –al gcc g++
gcc --version
g++ --version