Programming at CMU

Following is a step-by-step description of how to compile and run the ``hello, world'' C++ program using Metrowerks CodeWarrior. Go through the steps, trying to understand what you are doing. If you get stuck, ask a classmate or a PGSS CS staff member for help.

(Most of the Macintosh computers around campus also have Metrowerks CodeWarrior, and the programming procedure for them is nearly identical to what appears here. Feel free to use them, especially if all the PCs are occupied.)

The CodeWarrior environment is slightly nonstandard; it requires a additional line reading ``using namespace std;''.

#include <iostream>
#include <string>

using namespace std;

int main() {
    // this program prints the words ``hello, world'' and exits
    cout << "hello, world" << endl;
    return 0;
}