I'm trying to make a program, with Box2D for the physics, and SFML for the graphics. However, I get a runtime error after I initialize sf::Window. Here is my source code: (I'm not including the Box2D part)
#include "SFML/System.hpp"
#include "SFML/Window.hpp"
#include "SFML/Graphics.hpp"
#include <cstdio>
int main()
{
sf::Window app(sf::VideoMode(800, 600, 32), "Box2D SFML");
for (int32 i = 0; i < 60; ++i)
{
app.Display();
}
return 0;
}
I get this runtime error:
Run-Time Check Failure #2 - Stack around the variable 'app' was corrupted.
What's happened? I've got this working before...[/code]