On Unix and Linux, cc (lowercase) is always the C compiler. The spelling of the C++ compiler command depends on the source of the compiler. With Solaris Studio, the C++ compiler command is CC (uppercase).
On many implementations, the C and C++ compilers are the same program, but when run in C mode (via the cc command), will not recognize C++ programming constructs, and usually do not know how find the C++ runtime libraries.
Solaris Studio includes C and C++ compilers, among other things. It is free to download and use for any purpose, including commercial program development.. To get support or patches, you need an Oracle service contract.
Solaris Studio is not supported on Ubuntu Linux, but you may find that it works for you.