14. File Processing

A great memory does not make a philosopher, any more than a dictionary can be called grammar.

—John Henry, Cardinal Newman

I can only assume that a “Do Not File” document is filed in a “Do Not File” file.

—Senator Frank Church Senate Intelligence Subcommittee Hearing, 1975


In this chapter you’ll learn:

• To create, read, write and update files.

• Sequential file processing.

• Random-access file processing.

• To use high-performance unformatted I/O operations.

• The differences between formatted-data and raw-data file processing.

• To build a transaction-processing program using random-access file processing.

• To understand the concept of object serialization.

Get C++ How to Program, Ninth Edition now with O’Reilly online learning.

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