|
Quick generic class q
The only reason I ask this question is that my reference book doesn't make mention of it. Can you only declare a generic class with a base class? i.e.
When I try to do this the compiler(DJGPP) says:
type 'derived' is not a base type for type 'base'
Sounds to me like you can only use base classes.. Why must they make things so difficult?
JoeDark
Edited by - JoeDark on January 25, 2001 1:56:53 PM
Edited by - JoeDark on January 25, 2001 1:58:30 PM
Sounds like your compiler is broken...
Are you sure this is what causes the error?
Are you sure this is what causes the error?
Ok, I looked at it a bit closer, and it doesn't seem to complain about the actual declaration, it seems to give me that error regarding the member functions of the generic class.
Hmm.. I see what it's saying now. Thanks for you help.. turns out I was trying to put a base class into a derived pointer. Don't I feel stupid In that context the error makes perfect sense.
JoeDark
Edited by - JoeDark on January 26, 2001 2:13:33 PM
Hmm.. I see what it's saying now. Thanks for you help.. turns out I was trying to put a base class into a derived pointer. Don't I feel stupid In that context the error makes perfect sense.
JoeDark
Edited by - JoeDark on January 26, 2001 2:13:33 PM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement