gcc is the universal front-end. It will compile and link anything supported by the compiler collection.Of course, you can always use gcc if you remeber to link against libstdc++ (I think).
However that said g++ is better for both compiling and linking c++ code, because it uses slightly different depencency tracking etc.