Chances are you'll already have gcc.
Open Terminal, and type gcc and press enter. If you have it, it'll say something like: "gcc - no input files". Try this with g++ and c++, and you should get the same result, except it'll say g++/c++ - no input files instead of gcc.
Try it.