CHAPTER 17

image

File Input and Output

THE C++ LANGUAGE has no provision for input and output. The subject of this chapter is the input and output (I/O) capabilities that are available in the Standard Library, which provides support for device-independent input and output operations. You’ve used elements of these facilities to read from the keyboard and output to the screen in all the examples so far. In this chapter I’ll expand on that and explain how you can read and write disk files. By the end of this chapter, you’ll have learned:

  • What a stream is
  • What the standard streams are
  • How binary streams differ from text streams
  • How to create and use file ...

Get Beginning C++ 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.