Step 1: Log on to pegasus
Step 2: Start up the editor
emacs hello.cpp
and push ENTER of course. Your screen should look something like this:
Step 3: Type in your program
#include <iostream.h>
void main() {
cout << "Hello, world!" << endl;
}
Your screen should look like this:

Step 4: Save the file and exit the editor
Step 5: Compile the program:
g++ hello.cpp
If there are no errors, the computer will return silently to the <pegasus> prompt. The executable file will be named a.out.
Step 6: Run the program
a.out
The program will run and simply print out a message.
Step 7: Log out
logout