Chapter 12. File Input and Output


This chapter provides an overview of how to read information from files into your programs. It also explains how to write information out to files. Programmers call this file input and output, or just file I/O.

Nearly all programs perform file I/O, even if it's only a small amount. Games are no exception. In fact, games often do large amounts of file I/O. As a result, reading from and writing to files is an essential skill for every game programmer.

In this chapter, you'll learn the basics of file I/O. First, the chapter discusses what games use file I/O for. Next, it describes the types of files you can read and write. Finally, it demonstrates basic I/O techniques. These techniques prepare you for the file I/O tasks you'll perform in Part 5, "The Big Payoff." In Part 5, you'll see how to do such tasks as reading level files and saving a player's progress to a file.



Creating Games in C++(c) A Step-by-Step Guide
Creating Games in C++: A Step-by-Step Guide
ISBN: 0735714347
EAN: 2147483647
Year: N/A
Pages: 148

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net