If you are planning on using a compiler other than g++, you may skip this tutorial, moving on to Hello World.
G++ is a part of the Gnu Compiler Collection (GCC), g++ being the c++ compiler.
If you are using Linux, there is a good chance you already have g++. Skip down to Making Sure it Runs to check. Otherwise you will have to download a package for your distribution. Building from source, in this case, isn't really an option, since you don't seem to have a compiler.
If you are using Windows, I would recommend downloading and installing MinGW (Minimalist GNU for Windows). Follow the downloads link to their SourceForge site, and get the "Automated MinGW Installer". Be sure to check "g++" and "make" as install options.
You will probably want to add the executables directory to you PATH, so you can run them directly. Right-click on "My Computer", go to "properties", and then the "Advanced" tab. Click on "Environment Variables" and edit the "PATH" variable, adding "C:\MinGW\bin" (substitute the path if you installed it elsewhere) to the list, separated by a semi-colon (;).
Enter the following at your command prompt:
g++ -v
You should see something like the following:
$ g++ -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4.3.2/configure --prefix=/usr --libexecdir=/usr/lib --en able-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu -- enable-languages=c,c++ --disable-bootstrap Thread model: posix gcc version 4.3.2 (GCC) $
If you get an error about command not found, either the compiler is not on your system, or your shell cannot find it. Please go back to Getting g++.
Next, we will create an actual Hello World source file, and compile an executable.