I have a game object that receives reference to RenderWindow object
And this game.draw passes the const reference to window further down to menu object also as a const reference
game.draw(const sf::RenderWindow & r)
{
menu.draw(r);
}
Using the window reference, menu object draws some stuff.
menu.draw(const sf::RenderWindow & r)
{
r.draw(/*draw some stuff here*/);
}
when I try to pass the window object by const reference I get an error
"overloads have no legal conversion for 'this' pointer"
Why can't I do this?