Creating a C++ Program
We are going to create our first C++ program. At the command line type "emacs Hello_World.cpp" to open your program. This program is going to read two lines from standard in, average them, and output the result.
Remember the outline of a C++ program:
#include<iostream> using namespace std; int main() { return 0; }
Compiling and Running
To compile, we use the command "g++ -Wall Hello_World.cpp -o Hello_World.out".
To run, use "./Hello_World.out".