Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- entrant.cpp:28:41: error: request for member ‘get_id’ in ‘((Entrant*)this)->Entrant::course’, which is of pointer type ‘Course*’ (maybe you meant to use ‘->’ ?)
- ----
- Translation: On line 28 of entrant.cpp, position 41, you're using the dot operator to access an attribute (get_id) of a pointer (course in namespace Entrant). This is invalid. You have to use the arrow operator to de-reference the pointer and access the members of the thing it points to.
- ie you're doing
- course.get_id; // valid Java.
- course->get_id; // valid C++
- Does this help?
- At the risk of starting a cargo cult, Hungarian Notation is useful for avoiding these kinds of errors.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement