Oracle® Solaris Studio 12.4: C++ User's Guide

Exit Print View

Updated: March 2015
 
 

13.3 Using the Classic iostream Library

To use routines from the classic iostream library, you must include the header files for the part of the library you need. The header files are described in the following table.

Table 13-1  iostream Routine Header Files
Header File
Description
iostream.h
Declares basic features of iostream library.
fstream.h
Declares iostreams and streambufs specialized to files. Includes iostream.h.
strstream.h
Declares iostreams and streambufs specialized to character arrays. Includes iostream.h.
iomanip.h
Declares manipulators: value s you insert into or extract from iostreams to have different effects. Includes iostream.h.
stdiostream.h
(obsolete) Declares iostreams and streambufs specialized to use stdio FILEs.Includes iostream.h.
stream.h
(obsolete) Includes iostream.h, fstream.h, iomanip.h, and stdiostream.h. For compatibility with older style streams from C++ version 1.2.

You usually do not need all of these header files in your program. Include only the ones that contain the declarations you need. By default, libiostream contains the classic iostream library.