Chapter 32. Working with Files and Streams

<feature>
  • Understand stream objects and stream types

  • Discover how to use file streams

  • Use input and output streams

  • Create formatted stream output using manipulators

  • Use stream buffers and callbacks

</feature>

Working with Streams

Like its predecessor C, C++ doesn’t directly support input/output (I/O) operations as part of the base language as it does for object-oriented programming features such as inheritance and polymorphism, or generic programming such as templates. C++ directly supports these other features by keywords and architecture inherent to the language. As it was in C, I/O in C++ has been left up to programmers to define for themselves, using the base language features to implement it.

After more ...

Get Practical C++ now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.