August 2002
Beginner
1122 pages
22h 1m
English
| 1. | Here is the new function declaration that needs to be added to the StockItem interface definition (from code\item6.h):
void Write(ofstream& s); and the one to be added to the Inventory interface definition (from code\invent2.h): void StoreInventory(ofstream& OutputStream); | |
| 2. | Figure 6.36 shows the implementation of the Write member function for StockItem, and Figure 6.37 is the implementation of the StoreInventory member function of the Inventory class. As you can see, neither of these functions is tremendously complex or, for that matter, very different from the Display function.
Figure 6.36. The Write member function for the StockItem class (from code\item6.cpp
|
Read now
Unlock full access