On a Linux (or Unix, and even windows) machine you'd open up a blank text document. Then you'd write all the code in there. Then you'd save that document as a .CPP file. Then you'd make sure you have a copy of GCC (or any C++ compiler For Windows I'd suggest something like Bloodshed's Dev-C++). Then you'd compile it by using a command like:
Code:
gcc -o your_file.cpp
The command is different for every compiler, so You'll need to read the documentation.
Then it would output a binary file, that you could run.