Quote:
Originally Posted by Gene Poole View Post
Just because it works doesn't mean it's right. When you smash your stack, you invoke undefined behavior. The program may seem to work fine, but there is definitely a problem, and depending on the circumstances, the problem may manifest itself in other unforeseen ways.

Since you are receiving this message, the debugger is protecting you from some of the damage by surrounding your stack with its buffer zone, but in a release build, you'll probably get random unexplained crashes.

Why don't you post the code from your function and see if we can come up with the reason? The debugger should give you a hint that it is "around the variable 'gamechoice'". This is a valuable clue. Perhaps the variable before 'gamechoice' is an array and you are assigning a variable to the array that is out-of-bounds. Perhaps the variable after 'gamechoice' is an array and is being indexed with a negative value. Perhaps 'gamechoice' itself is the problem.

I have examined gamechoice in debug before the return(0) statement and all is as should be.
There is nothing wrong with my code as i have re build my project in C++ 6.0 and theres no issues at all. It's something to do with VS2008, not sure what yet but i'm going to find out.
I spent all weekend building this project, so pretty pissed off that this is happening.

My exe's won't work on certain computers when i build with VS2008, but will work on all when build with C++ 6.0

The facts are that my code is fine, so for now that's all i am concerned about. Thanks for your input

EDIT: I may put my code up when i get a chance.

Last edited by Player; 16Nov2009 at 19:41..