Streams (including File I/O)

CS-150, Fall '02, Learning Objectives


Text File I/O

Know which header file must be included in a program for file stream input and output (I/O).

Be able to write the C++ code to create a file stream object.

Be able to write the C++ code to open a file stream object.

Be able to extract individual data items (ints, doubles, text, etc.) from a file stream.

Be able to extract an entire line of text from a file stream into a single char array or STL string.

Be able to get and unget a single character from a file stream.

Be able to use the .fail() and .eof() file stream member functions to determine the status of a file stream.

Know what a buffer is and what the .flush() member function does.

Know when and how to close a file stream.

Be able to provide reasonable error control in programs using file streams.

String Streams (Optional - will not be covered on final exam)

Be able to explain how string stream I/O can be useful in a program.

Know which header file must be included in a program for string stream input and output (I/O).

Be able to construct a string stream object.

Be able to extract from and insert to a string stream object.


Send comments and suggestions about these objectives to: Dr. Charles S. Tritt
This page last updated 11/19/02