The Final Voyage

Now let's get to the detailed analysis of the final version of the home inventory program. We'll start with the main() function of this program, which is shown in Figure 13.1.

Figure 13.1. The main() function of the final version of the home inventory main program (from code\hmtst8.cc)

This starts off much like the previous versions, by creating a HomeInventory object called MyInventory and loading it with data from an input file called home.inv. Then it enters an "endless" for loop that calls the GetMenuChoice function to find out what operation the user wants to perform, and finally then calls the ExecuteMenuChoice function ...

Get Learning to Program in C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.