User Tools

Site Tools


c_plus_plus_io

C++ Input/output library

https://en.cppreference.com/w/cpp/io

C++ includes two input/output libraries: an OOP-style stream-based I/O library and the standard set of C-style I/O functions.

Stream-based I/O

The stream-based input/output library is organized around abstract input/output devices. These abstract devices allow the same code to handle input/output to files, memory streams, or custom adaptor devices that perform arbitrary operations (e.g. compression) on the fly.

Most of the classes are templated, so they can be adapted to any basic character type. Separate typedefs are provided for the most common basic character types (

and

). The classes are organized into the following hierarchy:

Typedefs

The following typedefs for common character types are provided:

Predefined standard stream objects

[[cpp/io/manip|I/O Manipulators]]

The stream-based I/O library uses I/O manipulators (e.g.

,

, etc.) to control how streams behave.

Types

The following auxiliary types are defined:

The following typedef names for

are provided:

|

}}

|

}}

|

}}

|

}}

|

}}

Error category interface

[[cpp/io/c | C-style I/O]]

C++ also includes the input/output functions defined by C, such as

,

, etc.

c_plus_plus_io.txt · Last modified: 2024/04/28 03:32 (external edit)