Taking Inventory

The StockItem class is designed to keep track of an individual item in the inventory, but we also need a way to keep track of all the StockItems in the store. So let's take a look at the next version of the class that serves that purpose in the inventory control application, Inventory. Figure 9.3 shows the header file for this version of that class, which is essentially identical to the last one from Chapter 6, except that we have added a ReorderItems function to allow us to generate a reorder report for all of the items in stock.

Figure 9.3. The next header file for the Inventory class (code\invent20.h)

Besides the default ...

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.