/* Filename: product.h Author: Br. David Carlson Date: July 5, 1998 Revised: July 30, 1998 so that a Product object no longer contains a string, but only a pointer to a string outside of the object. Revised: July 20, 2000 to use modern headers. This file sets up the StringMax constant, the ShortString typename, and most importantly, the Product class, with the fields and functions shown below, as well as the type ProductPtrType. */ #include using namespace std; const int StringMax = 48; typedef char ShortString[StringMax]; typedef char * CharPtrType; class Product { private: CharPtrType NamePtr; int Year; float Price; public: Product(ShortString InitialName = "", int InitialYear = 0, float InitialPrice = 0.0); ~Product(void); void Print(void) const; }; typedef Product * ProductPtrType;