![]() |
Data Abstraction and Problem Solving with C++Walls and Mirrorsby Frank M. Carrano |
![]() |
c04p228.hGo to the documentation of this file.00001 00016 // stock list 00017 class StockList 00018 { 00019 public: 00020 ... 00021 private: 00022 // node for wait list of people waiting for certain titles 00023 struct WaitNode 00024 { string who; 00025 WaitNode *next; 00026 }; // end WaitNode 00027 00028 // stock item 00029 class StockItem 00030 { 00031 public: 00032 ... 00033 private: 00034 string title; 00035 int have, want; 00036 }; // end StockItem 00037 00038 // node for inventory list of stock items 00039 struct StockNode 00040 { StockItem item; 00041 WaitNode *waitHead, *waitTail; 00042 StockNode *next; 00043 }; // end StockNode 00044 00045 // pointer to first stock node on the list 00046 StockNode *head; 00047 }; // end StockList |