GCC is good, but some proprietary compilers might do something "better", e.g. Intel's compiler can optimize for Intel processors a bit more, but has other limitations. Clang is said to have neat errors.
Clang's errors are more informative (and colorful) than GCC's, especially with templates. Trying to read the same error messages with GCC is a nightmare. Also, clang is generally a front-runner with new C++ features - they're already implementing things from the standard after C++14.
sudo apt-get install build-essential clang
I think Clang is waaaay better than gcc.
There is a reason why Apple's Xcode IDE moved to Clang from gcc in OS X 10.7 or 10.8 maybe.
There is a better C++1y support in clang than gcc.
You should try both and see yourself which one is better.
it is very easy to install a free software in ubuntu just go to the ubuntu software center type which software u want and click on install button the software will get install automatically just u have to connect to the net and g++ is gud in ubuntu for c++ programs