Chapter 22. File Input and Output

Have you ever wondered how your favorite computer game remembers the high scores, even after the computer is turned off? How about your browser remembering your favorite websites? In this chapter, you’re going to learn how.

We have talked several times about how programs have three main aspects: input, processing, and output. Up until now, the input has mostly come directly from the user, from the keyboard and mouse. The output has been sent directly to the screen (or the speakers, in the case of sound). But sometimes you need to use input that comes from other sources. Quite often, programs need to use input that’s stored somewhere, rather than entered when the program is running. Some programs need to get ...

Get Hello World! Third Edition now with O’Reilly online learning.

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