home *** CD-ROM | disk | FTP | other *** search
/ Using Visual C++ 4 (Special Edition) / Using_Visual_C_4_Special_Edition_QUE_1996.iso / ch14 / contents.h < prev    next >
C/C++ Source or Header  |  1995-09-18  |  530b  |  27 lines

  1. // Contents.h
  2.  
  3. // Get needed include files
  4. #include <afx.h>
  5.  
  6. // Things to put in a RailroadCar
  7. class Cow {
  8. public:
  9.     // Public member functions
  10.     CString isA() { return "Cow"; }
  11.     CString Moo() { return "Moo!"; }
  12. };
  13.  
  14. class Passenger {
  15. public:
  16.     // Constructors and destructor
  17.     Passenger(CString NewName) { Name = NewName; }
  18.  
  19.     // Public member functions
  20.     CString isA() { return "Passenger"; }
  21.     CString GetName() { return Name; }
  22.     CString Complain() { return " Oh my poor back!"; }
  23.  
  24. private:
  25.     CString Name;
  26. };
  27.