This question already has an answer here:
I currently have the g++ version 5.4.0. I wanted to install 7.3.0
I am using Ubuntu 16.04. I have followed these instructions: Dependency issues while installing gcc 7.3 from Jonathon F's PPA.
I did not meet with any errors, but when I check my version after all these steps. It still shows 5.4.0.
Can anyone please tell me what has gone wrong? Any suggestions on how I could be able to fix this would be really helpful.