if i have
Student.h
Student.cppCode:class Student { public: enum Type { AStudent, BStudent, CStudent, DStudent }; Type StudentType() const; private: Type myType;
Code:Student::Type Student::StudentType() const { return myType; istream& Message::read(istream& stream) { int type; getline(stream,type); /*input should be a number [1-4]*/ myType = type; /* this does not work, complains about different types*/ /* how can i fix this? */ return stream; }