In general, read up about pass by value and pass by reference, as they are important C++ concepts. ![Cheesy :D](https://www.sfml-dev.org/forums/Smileys/default/cheesy.gif)
This is what you need to do, instead of coming here asking very, very basic C++ questions
![Wink ;)](https://www.sfml-dev.org/forums/Smileys/default/wink.gif)
sf::RenderWindow& Window(sf::VideoMode(screenDimension.x, screenDimension.y), "Games States");
You can't initialize references.....
![Tongue :P](https://www.sfml-dev.org/forums/Smileys/default/tongue.gif)
int main()
{
sf::RenderWindow Window(sf::VideoMode(screenDimension.x, screenDimension.y), "Games States");
DoSomething(Window);
}
void DoSomething(sf::RenderWindow& MyWindowReference)
{
}