JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Studio 12.3: C++ User's Guide     Oracle Solaris Studio 12.3 Information Library
search filter icon
search icon

Document Information

Preface

Part I C++ Compiler

1.  The C++ Compiler

2.  Using the C++ Compiler

3.  Using the C++ Compiler Options

Part II Writing C++ Programs

4.  Language Extensions

5.  Program Organization

6.  Creating and Using Templates

7.  Compiling Templates

8.  Exception Handling

9.  Improving Program Performance

10.  Building Multithreaded Programs

Part III Libraries

11.  Using Libraries

12.  Using the C++ Standard Library

13.  Using the Classic iostream Library

13.1 Predefined iostreams

13.2 Basic Structure of iostream Interaction

13.3 Using the Classic iostream Library

13.3.1 Output Using iostream

13.3.1.1 Defining Your Own Insertion Operator

13.3.1.2 Handling Output Errors

13.3.1.3 Flushing

13.3.1.4 Binary Output

13.3.2 Input Using iostream

13.3.3 Defining Your Own Extraction Operators

13.3.4 Using the char* Extractor

13.3.5 Reading Any Single Character

13.3.6 Binary Input

13.3.7 Peeking at Input

13.3.8 Extracting Whitespace

13.3.9 Handling Input Errors

13.3.10 Using iostreams With stdio

13.4 Creating iostreams

13.4.1 Dealing With Files Using Class fstream

13.4.1.1 Open Mode

13.4.1.2 Declaring an fstream Without Specifying a File

13.4.1.3 Opening and Closing Files

13.4.1.4 Opening a File Using a File Descriptor

13.4.1.5 Repositioning Within a File

13.5 Assignment of iostreams

13.6 Format Control

13.7 Manipulators

13.7.1 Using Plain Manipulators

13.7.2 Parameterized Manipulators

13.8 strstream: iostreams for Arrays

13.9 stdiobuf: iostreams for stdio Files

13.10 Working Withstreambuf Streams

13.10.1 streambuf Pointer Types

13.10.2 Using streambuf Objects

13.11 iostream Man Pages

13.12 iostream Terminology

14.  Building Libraries

Part IV Appendixes

A.  C++ Compiler Options

B.  Pragmas

Glossary

Index

13.12 iostream Terminology

The iostream library descriptions often use terms similar to terms from general programming but with specialized meanings. The following table defines these terms as they are used in discussing the iostream library.

Table 13-4 iostream Terminology

iostream Term
Definition
Buffer
A word with two meanings, one specific to the iostream package and one more generally applied to input and output.

When referring specifically to the iostream library, a buffer is an object of the type defined by the class streambuf.

A buffer, generally, is a block of memory used to make efficient transfer of characters for input of output. With buffered I/O, the actual transfer of characters is delayed until the buffer is full or forcibly flushed.

An unbuffered buffer refers to a streambuf where there is no buffer in the general sense defined above. This chapter avoids use of the term buffer to refer to streambufs. However, the man pages and other C++ documentation do use the term buffer to mean streambufs.

Extraction
The process of taking input from an iostream.
Fstream
An input or output stream specialized for use with files. Refers specifically to a class derived from class iostream when printed in monospace font.
Insertion
The process of sending output into an iostream.
iostream
Generally, an input or output stream.
iostream library
Refers to a library implemented by the include files iostream.h, fstream.h, strstream.h, iomanip.h, and stdiostream.h. Because iostream is an object-oriented library, you should extend it.
Stream
An iostream, fstream, strstream, or user-defined stream in general.
streambuf
A buffer that contains a sequence of characters with a put or get pointer, or both. When printed in monospace font, it means the particular class. Otherwise, it refers generally to any object of class streambuf or a class derived from streambuf. Any stream object contains an object, or a pointer to an object, of a type derived from streambuf.
strstream
An iostream specialized for use with character arrays. It refers to the specific class when printed in monospace font.