You use g++ to compile C++ code, e.g. "g++ hello.cpp -o hello". If you get a "command not found" error, then you'll need to install the g++ package for your distro (and possibly others, too). If this is the case, please tell us which distro you're using.
Also, you do have the line "using namespace std;" under your "#include <iostream>", right? If not, you need to add it, or use "std::cout" rather than just "cout" (the same goes for cin).
Last edited by Nylex; 06-24-2009 at 01:46 AM.