Introduction

Storage of data in variables and arrays is temporary. Files are used for data persistencepermanent retention of large amounts of data. Computers store files on secondary storage devices, such as magnetic disks, optical disks and tapes. In this chapter, we explain how to build C++ programs that create, update and process data files. We consider both sequential files and random-access files. We compare formatted-data file processing and raw-data file processing. We examine techniques for input of data from, and output of data to, string streams rather than files in Chapter 18.

Категории