Personal tools
Chapter 2: Stream Input/Output
Click on the banner to return to the user guide home page.
Chapter 2: Stream Input/Output
- 2.1 How to Read This Section
- 2.1.1 Code Examples
- 2.1.2 Terminology
- 2.2 The Architecture of Iostreams
- 2.2.1 What Are the Standard Iostreams?
- 2.2.2 How Do the Standard Iostreams Work?
- 2.2.3 How Do the Standard Iostreams Help Solve Problems?
- 2.2.4 The Internal Structure of the Iostreams Layers
- 2.3 Formatted Input/Output
- 2.3.1 The Predefined Streams
- 2.3.2 Input and Output Operators
- 2.3.3 Format Control Using the Stream's Format State
- 2.3.4 Localization Using the Stream's Locale
- 2.3.5 Formatted Input
- 2.4 Error State of Streams
- 2.4.1 Checking the Stream State
- 2.4.2 Catching Exceptions
- 2.5 File Input/Output
- 2.5.1 The Difference between Predefined File Streams (cin, cout, cerr, and clog) and File Streams
- 2.5.2 Code Conversion in Wide Character Streams
- 2.5.3 File Streams
- 2.5.4 The Open Mode
- 2.5.5 Binary and Text Mode
- 2.6 In-Memory Input/Output
- 2.6.1 The Internal Buffer
- 2.6.2 The Open Modes
- 2.7 Input/Output of User-Defined Types
- 2.7.1 An Example Using a User-Defined Type
- 2.7.2 A Simple Extractor and Inserter for the Example
- 2.7.3 Improved Extractors and Inserters
- 2.7.4 More Improved Extractors and Inserters
- 2.7.5 Patterns for Extractors and Inserters of User-Defined Types
- 2.8 Manipulators
- 2.8.1 Manipulators without Parameters
- 2.8.2 Manipulators with Parameters
- 2.9 Streams and Stream Buffers
- 2.9.1 Copying and Assigning Stream Objects
- 2.9.2 Sharing a Stream Buffer Among Streams
- 2.9.3 Copies of the Stream Buffer
- 2.10 Synchronizing Streams
- 2.10.1 Explicit Synchronization
- 2.10.2 Implicit Synchronization Using the unitbuf Format Flag
- 2.10.3 Implicit Synchronization by Tying Streams