class
<istream> <iostream>

std::iostream

typedef basic_iostream<char> iostream;
Input/output stream

[NOTE: This page describes the iostream class, for a description of the iostream library, see Input/Output library.]

This is an instantiation of basic_iostream with the following template parameters:
template parameterdefinitioncomments
charTcharAliased as member char_type
traitschar_traits<char>Aliased as member traits_type

This class inherits all members from its two parent classes istream and ostream, thus being able to perform both input and output operations.

The class relies on a single streambuf object for both the input and output operations.

Objects of these classes keep a set of internal fields inherited from ios_base, ios and istream:
fieldmember functionsdescription
Formattingformat flagsflags
setf
unsetf
A set of internal flags that affect how certain input/output operations are interpreted or generated.
See member type fmtflags.
field widthwidthWidth of the next formatted element to insert.
display precisionprecisionDecimal precision for the next floating-point value inserted.
localegetloc
imbue
The locale object used by the function for formatted input/output operations affected by localization properties.
fill characterfillCharacter to pad a formatted field up to the field width (width).
Stateerror staterdstate
setstate
clear
The current error state of the stream.
Individual values may be obtained by calling good, eof, fail and bad.
See member type iostate.
exception maskexceptionsThe state flags for which a failure exception is thrown.
See member type iostate.
Othercallback stackregister_callbackStack of pointers to functions that are called when certain events occur.
extensible arraysiword
pword
xalloc
Internal arrays to store objects of type long and void*.
tied streamtiePointer to output stream that is flushed before each i/o operation on this stream.
stream bufferrdbufPointer to the associated streambuf object, which is charge of all input/output operations.
character countgcountCount of characters read by last unformatted input operation (input streams only).

Member types

Member types char_type, traits_type, int_type, pos_type and off_type are ambiguous (multiple inheritance).
The class declares the following member types:
member typedefinition
char_typechar
traits_typechar_traits<char>
int_typeint
pos_typestreampos
off_typestreamoff

These member types inherited from its base classes (istream, ostream and ios_base):

Public member functions


Protected member functions


Public member functions inherited from istream


Public member functions inherited from ostream


Public member functions inherited from ios


Public member functions inherited from ios_base

  • 1793521592 2018-02-23
  • 2864591591 2018-02-23
  • 6167231590 2018-02-23
  • 3669201589 2018-02-23
  • 7946381588 2018-02-23
  • 8957701587 2018-02-23
  • 3891941586 2018-02-23
  • 6039851585 2018-02-23
  • 2573991584 2018-02-23
  • 7728781583 2018-02-23
  • 3731582 2018-02-23
  • 1007451581 2018-02-22
  • 8908121580 2018-02-22
  • 141161579 2018-02-22
  • 9421578 2018-02-22
  • 2826901577 2018-02-22
  • 3647361576 2018-02-22
  • 5717551575 2018-02-22
  • 523811574 2018-02-22
  • 6439871573 2018-02-22