sorry,it should be:
virtual TextureTarget* createTexture() = 0; and
virtual CEGUI::Texture *createTexture( void) {...}
i have corrected the code above
User Profile
Collapse
-
johnwang started a topic overriding virtual function, can the return type be either a pointer or a reference?in Coverriding virtual function, can the return type be either a pointer or a reference?
code example from an opensource game:
Code:namespace CEGUI{ class CEGUIEXPORT Renderer { public: virtual TextureTarget* createTexture() = 0; } } class cFake_Renderer : public CEGUI::Renderer { public: virtual CEGUI::Texture *createTexture(void) { return NULL; }; }
in vs2008 ,it cause a compile...
No activity results to display
Show More
Leave a comment: