code example from an opensource game:
in vs2008 ,it cause a compile error:
cFake_Renderer: :createTexture overriding virtual function return type differs and is not covariant from 'CEGUI::Rendere r::createTextur e'
does the author write a wrong code ?
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 error:
cFake_Renderer: :createTexture overriding virtual function return type differs and is not covariant from 'CEGUI::Rendere r::createTextur e'
does the author write a wrong code ?
Comment