Checking the Inventory

That concludes our tour of the HomeUtility namespace. Now it's time to look at the changes to the next class, HomeInventory. We'll start with the latest version of the header file, hmin8.cpp, shown in Figure 13.19.

Figure 13.19. The latest header file for the HomeInventory class (code\hmin8.h)
 //hmin8.h class HomeInventory { public: HomeInventory(); short LoadInventory(std::ifstream& is); void DumpInventory(); HomeItem AddItem(); HomeItem EditItem(short Index); Vec<short> LocateItemByDescription(const xstring& Partial); Vec<short> LocateItemByCategory(const xstring& Partial); Vec<short> LocateItemByPartialName(const xstring& Partial); void PrintNames(std::ostream &os); void PrintAll(std::ostream &os); void StoreInventory(std::ofstream& ...

Get C++: A Dialog Programming with the C++ Standard Library 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.