July 2023
Intermediate to advanced
670 pages
17h 13m
English
Now that you have a basic application up and running, it’s time to make it do something useful. We’ll add several features to our program throughout this chapter, but for now let’s focus on a single feature: displaying the contents of a file to the screen. To do that we’ll need to:
We’ll take each of these requirements in order. Once we’re done you’ll have a program that works like a minimal version of the Unix cat command.
Before we can do anything with a file, like reading it, we need to know what file we’re working with. For a command ...