multiple inheritance compiler warning
From: <- Chameleon -> (cham_gss_at_hotmail.NOSPAM.com)
Date: 03/27/04
- Next message: Old Wolf: "Re: Why sizeof(struct) is different in C and C++ ?"
- Previous message: Nick Hounsome: "Re: Why sizeof(struct) is different in C and C++ ?"
- Next in thread: John Carson: "Re: multiple inheritance compiler warning"
- Reply: John Carson: "Re: multiple inheritance compiler warning"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 27 Mar 2004 12:34:42 +0200
warning C4250: 'TTFtoFontGL' : inherits 'SaveToFontGL::SaveToFontGL::SaveFont' via dominance
what is this? why via dominance when I have only one "SaveFont" implementation?
My classes:
-----------------------------------------------
class FontCreator
{
public:
virtual void SaveFont() = 0;
...............................
};
class FontFromTTF : virtual public FontCreator
{
// add extra functionality, but with no implementation of "SaveFont()"
};
class SaveToFontGL : virtual public FontCreator
{
void SaveFont(); // implementation here
};
class TTFtoFontGL : public FontFromTTF, public SaveToFontGL {};
-----------------------------------------------
I can work with these warnings but this makes debugging very annoying
- Next message: Old Wolf: "Re: Why sizeof(struct) is different in C and C++ ?"
- Previous message: Nick Hounsome: "Re: Why sizeof(struct) is different in C and C++ ?"
- Next in thread: John Carson: "Re: multiple inheritance compiler warning"
- Reply: John Carson: "Re: multiple inheritance compiler warning"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]