enum year { fresh, soph, junior, senior, grad }; class student { public: student(char* nm, int id, double g, year x); void print() const; int student_id; double gpa; year y; char name[30]; };
enum support { ta, ra, fellowship, other }; class grad_student : public student { public: grad_student (char* nm, int id, double g, year x, support t, char* d, char* th); void print() const; grad_student(); support s; char dept[10]; char thesis[80]; };
enum support { ta, ra, fellowship, other }; class grad_student : student { public: grad_student (char* nm, int id, double g, year x, support t, char* d, char* th); void print() const; grad_student(); support s; char dept[10]; char thesis[80]; };
void main(){ grad_student s; strcpy(s.name , "Charles Babbage"); }