Introduction to OOP | Chapter 20: The STL : | next | previous | audio | real | text |
Inventory is two lists - items on hand, items on back order.
class inventory { public: // process order for widget type wid void order (int wid); // receive widget of type wid // in shipment void receive (int wid); protected: list <Widget> on_hand; list <int> on_order; };