Abstract
In C++, input and output (I/O for short) mostly happens through an abstraction known as streams. Streams allow you to perform I/O operations without knowing the details of their target or source. Be it your command-line interface, a string, or a file—streams offer an easy, uniform interface to communicate with any of these.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsNotes
- 1.
The u8path() factory function will be deprecated by C++20 with the introduction of the char8_t character type. With this addition, the normal path constructors will be updated to support UTF-8 encoded strings with type char8_t.
- 2.
Will normally become char8_t in C++20.
- 3.
Some library implementations use errno (see Chapter 8) to report errors for C-style I/O functions, including the printf() and scanf() functions: consult your library documentation to confirm.
- 4.
wint_t is defined in <cwchar> and is an alias for an integral type large enough to hold any wide character (wchar_t value) and at least one value that is not a valid wide character (WEOF).
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2019 Peter Van Weert and Marc Gregoire
About this chapter
Cite this chapter
Van Weert, P., Gregoire, M. (2019). Input/Output. In: C++17 Standard Library Quick Reference. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-4923-9_5
Download citation
DOI: https://doi.org/10.1007/978-1-4842-4923-9_5
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-4922-2
Online ISBN: 978-1-4842-4923-9
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books