I've got this weird problem: whenever I try to get input to my code, the window crashes.
#include <iostream>
#include <SFML/window.hpp>
int main() {
char myChar;
sf::Window window( sf::VideoMode(200, 200),"window");
while (window.isOpen()) {
sf::Event event;
while (window.pollEvent(event)) {
if (event.type == sf::Event::Closed)
window.close();
}
std::cin >> myChar;
}
}
I got SFML 2.1, and I am using Code::Blocks 13.12