The gnu c and c++ compilers come with Mac OS/X, though they are not installed by default---you need to do the installation from the provided CD-ROM (this may be different in different releases). The installation is trivial, though upgrading to the latest release of gcc may be a bit more difficult.