The following doesnt compile in VC2005 and I dont understand why.
It says "cannot convert this pointer from const Sprite to Sprite &"
All code is in the header and if I move GetXPos to .cpp it does compile but I would like to know why it doesnt when everything is in the header.
Code:// sprite.h
class X
{
bool GetXPos() const;
private:
Sprite array[10];
};
inline bool X::GetXPos(point p) const
{
return array[BUTTON_IMAGE].GetXPos(); // also const
}

