I'm trying to use pass by reference so I can get my mouse X and Y coordinates relative to the screen inside another class but I am having trouble doing so
what i have is
void MenuNav(sf::RenderWindow*) //in h file
//in the cpp i have
void HUD::MenuNav(sf::RenderWindow *Window)
{
sf::Mouse::getPosition(Window).x;
}
but it seems to have a problem with that.
Error:no instance of overloaded function, I know that the problem is Window in the getPosition function but i cant figure out what is meant to go there.