Advertisement

deriving from a already derived class

Started by April 20, 2001 04:43 AM
1 comment, last by WoX 23 years, 9 months ago
can that be done? I have a base class A then I derive a class B from that now, can I derive a class C from B? when I try I get error C2504: ''B'' : base class undefined anyone have done anything alike, please mail an example or explain how to do it thanks
Of course you can!

Check if you have included the .h file where you define class b.

If you have, try to foredeclare(does this word exist? xD)it.That is:


class B;
/*THIS TELLS THE COMPILER THAT YOU WILL DEFINE CLASS B LATER ON*/

class C:public B
{
...........
};

What the hells!
What the hells!
Advertisement
ey man
I found a chapter ''bout it in a book
gonna check it out first
but thanks anyway!

This topic is closed to new replies.

Advertisement