1int main()
2{
3 sf::RenderWindow window(sf::VideoMode(800, 600), "My window");
4
5 // run the program as long as the window is open
6 while (window.isOpen())
7 {
8 // check all the window's events that were triggered since the last iteration of the loop
9 sf::Event event;
10 while (window.pollEvent(event))
11 {
12 // "close requested" event: we close the window
13 if (event.type == sf::Event::Closed)
14 window.close();
15 }
16 }
17
18 return 0;
19}