USL I/O Stream Header Files

To use a USL I/O Stream class, you must include the appropriate header files for that class. The following lists USL I/O Stream header files and the classes that they cover:

The header file iostream.h contains declarations for the basic classes:

The header file fstream.h contains declarations for the classes that deal with files:

The header file stdiostream.h contains declarations for stdiobuf and stdiostream, the classes that specialize streambuf and ios, respectively, to use the FILE structures defined in the C header file stdio.h.

OS/400 The 8.3 file naming convention compliant name of this file is stdiostr.h. Under IFS, you can use either the short name or the long name (stdiostream.h).

The header file strstream.h contains declarations for the classes that deal with character strings.

OS/400 The 8.3 file naming convention compliant name of this file is strstrea.h. Under IFS, you can use either the short name or the long name (strstream.h).

The first “str” in each of these names stands for “string”:

The header file iomanip.h contains declarations for the parameterized manipulators. Manipulators are values that you can insert into streams or extract from streams to affect or query the behavior of the streams.

The header file stream.h is used for compatibility with earlier versions of the USL I/O Stream Library. It includes iostream.h, fstream.h, stdiostream.h, and iomanip.h, along with some definitions needed for compatibility with the AT&T C++ Language System Release 1.2. Only use this header file with existing code; do not use it with new C++ code.

If you use the obsolete function form() declared in stream.h, there is a limit to the size of the format specifier. If you call form() with a format specifier string longer than this limit, a runtime message will be generated and the program will terminate.

Related Concepts