I have:
class XILightSource
{
public:
virtual XVec2 position() const = 0;
};
class XLightSprite : public XSprite, public XILightSource
{
};
The problem is that XSprite
already has the same function position
. How can i say to compiler, that i want to use XSprite::position
function as an implementation of XILightSource::position()
?
override it and call XILightSource::position() :
class XLightSprite : public XSprite, public XILightSource
{
public:
XVec2 position() const { return XSprite::position(); }
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With