On a MacOS system, you can get Apple's versions of g++, gdb, and make by installing the Xcode Command Line Tools. These are free from the Apple Store, but you will need to create a free Apple Developers account. When you install the Command Line Tools, Apple's installation wizard should also update your PATH variable for you.
If you happen to be using MacOS 10.6 (Snow Leopard), click here to download XCode 3.2.6, the last version of XCode that was compatible with MacOS 10.6.8.
If you experience problems installing Apple's Command Line Tools, try quitting iTunes and iTunesHelper (e.g., quit iTunes normally; then use the Terminal command killall iTunesHelper to terminate iTunesHelper) because these have in the past interfered with installing Xcode.
If you are comfortable with the MacOS command-line and want a newer version of g++ than the one available from Apple, you can get one using the MacPorts package manager. MacPorts has over 13,000 free and open-source programs for your mac, so I would encourage you to learn to use it.