Corruption around stack with my program upon exiting.

Hello, this is my first time posting on this forum and i am a noob with Cpp. I am making a game which was working well. Well i used files, i get an error "stack around variable 'x' was corrupted." I never got this error message before, and all of the solutions that i read have not worked, or i did not understand.

Please help!

http://www.filehosting.org/file/details/387471/Ketchum_all_simulator.zip
Check to see you aren't writing to invalid memory; array indexes are especially prone to this if you aren't careful.
I saw posts say this, but this problem didn't happen until i added in files. I wrote the game without files at first, and it worked fine.
Something to do with the array, i just increased the size by 1, didnt do anythiing with the last part of the array, and it worked! I swear there wasnt a problem before....
That's the tricky thing about programming errors such as buffer overflows. The program may not crash right now, and may not even crash during your lifetime, or even at all. But even the smallest of things can trigger a crash and -- and this is the killer -- the point at which the program crashes will likely be perfectly correct and have nothing to do with the actual culprit.
Topic archived. No new replies allowed.