I upgrade my system from 16.04 to 18.04 but the gcc and g++ version change to 7 such that some of my program cannot compile, so how can I change gcc and g++ version to 4.8?
Thanks
To install gcc-4.8 open the terminal and type:
sudo apt remove gcc gcc-8 g++ g++-8
sudo apt install gcc-4.8 g++-4.8
You can also have multiple versions of gcc/g++ installed alongside each other and select which version to use each time: How to use multiple instances of gcc?.