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 >
Wrap
C/C++ Source or Header
|
1995-09-18
|
530b
|
27 lines
// Contents.h
// Get needed include files
#include <afx.h>
// Things to put in a RailroadCar
class Cow {
public:
// Public member functions
CString isA() { return "Cow"; }
CString Moo() { return "Moo!"; }
};
class Passenger {
public:
// Constructors and destructor
Passenger(CString NewName) { Name = NewName; }
// Public member functions
CString isA() { return "Passenger"; }
CString GetName() { return Name; }
CString Complain() { return " Oh my poor back!"; }
private:
CString Name;
};