C++ includes the following input/output libraries: an OOP-style stream-based I/O library, print-based family of functions(since C++23), and the standard set of C-style I/O functions.
[edit] Stream-based I/OThe 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 (char and wchar_t). The classes are organized into the following hierarchy:
Inheritance diagram
[edit] TypedefsThe following typedefs for common character types are provided in namespace std
:
The stream-based I/O library uses I/O manipulators (e.g. std::boolalpha, std::hex, etc.) to control how streams behave.
[edit] TypesThe following auxiliary types are defined:
represents relative file/stream position (offset from fpos), sufficient to represent any file sizeThe following typedef names for std::fpos<std::mbstate_t> are provided:
[edit] Error category interface (since C++11) [edit] Print functions (since C++23)The Unicode-aware print-family functions that perform formatted I/O on text that is already formatted. They bring all the performance benefits of std::format, are locale-independent by default, reduce global state, avoid allocating a temporary std::string object and calling operator<<, and in general make formatting more efficient compared to iostreams and stdio.
The following print-like functions are provided:
[edit] C-style I/OC++ also includes the input/output functions defined by C, such as std::fopen, std::getc, etc.
[edit] See alsoRetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4