Yeah, we'd need to see the declaration for the student part, not the teacher part, unless that is also giving you an error. Looks like you're not defining CStudent properly, or (and I'm guessing here, because you didn't include the code) your #ifndef at the top of student.h is actually an #ifdef...