13

IO Streaming

LEARNING OBJECTIVES

At the end of the chapter, you will be able to understand and program

  • Unformatted and formatted stream operators.

  • Use IO manipulator to format output.

  • Sequential and random/direct access file handling.

  • Read objects from and write objects onto a file

13.1 Introduction

What crosses your mind when you think of streams? Probably streams of water, we call them springs, flowing from the top of a hill to plains. In C++, we call streams or IO streams.

This chapter will introduce to you unformatted and formatted input and output streams. It deals extensively with stream manipulators that are used to format and control stream data. The chapter also concentrates on file handling in C++ through <fstream> header file. ...

Get Object-oriented Programming Using C++ and Java 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.