CMPSC 201 - Ch. 8 & Ch. 7.2 Notes

Note that we will not be studying sections 8.3 through 8.6 in this class.

Objective #1: Explain the concept of file stream objects in C++.

Objective #2: Use the common file stream methods including open and close.

Objective #3: Read from and write to sequential files using the necessary file stream methods.

do
{
    infile >> x;

    if ( !infile.eof( ) )
    {
            cout << x << endl;
    }

} while ( !infile.eof( ) );

Objective #4: Use string variables. (See Ch. 7.2 in your textbook for this discussion of the use of strings. This is the only part of Ch. 7 that we are studying in this class.)