Finishing up the HomeItem class
Now it's time to return to the HomeItem class. Luckily, the changes here are much smaller than the changes to the HomeInventory class. In fact, only one new function as been added to the HomeItem interface since the last version we looked at, hmit6.h. That function is GetCategory, whose base class version simply calls the derived class function of the same name, which merely returns the value of the m_Category variable in the item. We've seen enough of this type of function, so we won't bother going over it further.
However, some of the functions have changed in implementation, so we should take a look at them. We'll start with the only function declared in hmit6.h whose implementation has changed: operator >> ...
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.