Getting “Use of undefined type” and “Must have class/struct/union” errors
问题 EDIT #1: Everything before editing the line << "Owner: " << (*wo._owner).getLoginName() << endl; worked completely fine, or at least didn't throw errors on me. So I have the following code (obviously there is a lot more that if requested I will post, just not sure if more is needed or that is ok): class Workout { private: int _workoutid; // the ID of this workout User* _owner; // Who did this workout float _distance; // in miles int _duration; // in seconds int _day, _month, _year; // date: