Contents|Index|Previous|Next

Introduction to Iostreams

iostream classes implement most of the features of AT&T version 2.0 iostream library classes, and most of the features of the ANSI X3J16 library draft (which is based on the AT&T design).

However they only support streams of type, char, rather than using a template.

This documentation is meant as a reference; for tutorial material on iostreams, see the corresponding section of any recent popular introduction to C++.

Licensing terms for libio

Since the iostream classes are so fundamental to standard C++, the Free Software Foundation has agreed to a special exception to its standard license, when you link programs with libio.a.

As a special exception, if you link this library with files compiled with a GNU compiler to produce an executable, this does not cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License.

The code is under the GNU General Public License (version 2) for all purposes other than linking with this library which means that you can modify and redistribute the code as usual; remember that, if you do, your modifications, and anything you link with the modified code, must be available to others on the same terms.

Acknowledgments

Per Bothner wrote most of the iostream library, but some portions have their origins elsewhere in the free software community. Heinz Seidl wrote the IO manipulators. The floating-point conversion software is by David M. Gay of AT&T. Some code was derived from parts of BSD 4.4, which was written at the University of California, Berkeley.

The iostream classes are found in the libio library. An early version was originally distributed in libg++. Doug Lea was the original author of libg++, and some of the file-management code still in libio is his property.

Various people found bugs or offered suggestions. Hongjiu Lu worked hard to use the library as the default stdio implementation for Linux, and has provided much stress-testing of the library.