Install GCC on Ubuntu 14.04 LTS
I thought you have just launched on Ubuntu and have fallen in problem to compile C file.If you didn’t install gcc, don’t be worry ! Just copy the below commands, paste on your terminal and ENTER step by step:
Step-1: Open your terminal by Ctrl + Alt + T or from search box by typing
Step-2: Now run (copy, paste and hit Enter from your keyboard) the following command (one by one) on your terminal. Internet connection must be available on your PC in this time.
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get instal gcc-4.9
Now you can see that which version you have installed on your system. To check this put and run the following command
Install G++ on Ubuntu 14.04 LTS
Just copy the command and run on your terminal.
sudo apt-get install g++
Now check which version of G++ you have installed.
You can read the article: