#include <SFML/Window.hpp>
#include <SFML/Network.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/System.hpp>
using namespace std;
int main() {
sf::RenderWindow theWindow(sf::VideoMode(352, 352, 32), "HEllo World", sf::Style::Close);
theWindow.Display();
sf::Event Event;
while (theWindow.IsOpened()) {
while (theWindow.GetEvent(Event)) { // Get all the Events (User Input) and handle them
if (Event.Type == sf::Event::Closed)
theWindow.Close();
}
Sleep(1); // To reduce CPU-Usage
}
return 0;
}
I'm using CodeBlocks