13 Stream Input/Output: A Deeper Look

Objectives

In this chapter you’ll:

  • Use C++ object-oriented stream input/output.

  • Perform input and output of individual characters.

  • Use unformatted I/O for high performance.

  • Use stream manipulators to display integers in octal and hexadecimal formats.

  • Specify precision for both input and output.

  • Display floating-point values in both scientific and fixed-point notation.

  • Set and restore the format state.

  • Control justification and padding.

  • Determine the success or failure of input/output operations.

  • Tie output streams to input streams.

Get C++ How to Program, 10/e now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.