O'Reilly logo

Learn C on the Mac: For OS X and iOS, Second Edition by James Bucanek, David Mark Scott Brown

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter    11

Working With Files

Chapter 10 introduced DVDTracker, a program designed to keep track of your DVD collection. DVDTracker allowed you to enter a new DVD, as well as list all existing DVDs. DVDTracker’s biggest shortcoming was that it didn’t save the DVD information when it exited. If you ran DVDTracker, entered information on ten DVDs, and then quit, your information would be gone. The next time you ran DVDTracker, you’d have to start from scratch.

The solution to this problem is to somehow save all of the DVD information before you quit the program so it can be used again the next time you run it. This is called persistence. This chapter will show you how to implement persistence. It introduces the concept of files, the long-term ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required