Simple File I/O Example
//Reads three numbers from the file infile.dat,
//sums the numbers, and writes the sum to the
in_stream.open("infile.dat");
out_stream.open("outfile.dat");
int first, second, third;
in_stream >> first >> second >> third;
out_stream << "The sum of the first 3\n"
<< "numbers in infile.dat\n"
<< "is " << (first + second + third)
Note that there is no output to the screen
and no input from the keyboard