1
General / Stack around the variable was corrupted
« on: February 17, 2013, 03:40:53 pm »
I can't get rid of this error I'm having so I was hoping someone could help. The error is "Stack around the variable 'player' is corrupted". This is the player variable that I created in Movement's constructor:
sf::RectangleShape player(sf::Vector2f(40.f, 40.f));
player.setOrigin(20.f, 20.f);
player.setPosition(400.f, 40.f);
player.setFillColor(sf::Color(10, 30, 180));
That does not cause the error, the error comes up when I make the movement object in main, like this:
Movement MovementObj1;
So can anyone help?
sf::RectangleShape player(sf::Vector2f(40.f, 40.f));
player.setOrigin(20.f, 20.f);
player.setPosition(400.f, 40.f);
player.setFillColor(sf::Color(10, 30, 180));
That does not cause the error, the error comes up when I make the movement object in main, like this:
Movement MovementObj1;
So can anyone help?