Quick fix:
class Game
{
private:
static sf::RenderWindow window;
static sf::CircleShape circle;
public:
static void render()
{
while (window.isOpen())
{
window.clear();
circle.move(0.1f, 0.0f);
window.draw(circle);
window.display();
}
}
};
sf::RenderWindow Game::window(sf::VideoMode(800, 600), "Test");
sf::CircleShape Game::circle(50.0f);
int main()
{
Game game;
Game::render();
}
There are many ways to structure your code. This is just a quick fix in case you are wondering how to "make it work" modifying the code you provided the minimum as possible. I would definitely NOT recommend it.