Archived

This topic is now archived and is closed to further replies.

Debug Error?

This topic is 5872 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

im getting this strange "MVC++ Debug Library" "debug error" when my Win32 DOS Console program terminates, File: i386\chkesp.c "the value of ESP was not properly saved across a function call... ive gotten this in several programs ive made lately... ive been getting this alot... why?

Share this post


Link to post
Share on other sites
I''ve had this problem before (a long time ago) and can''t remember the exact problem - I think it was something to do with not calling function with the right calling convention or something?

Share this post


Link to post
Share on other sites
?? !

i have isolated the code, but, i dont see what the problem is.
i know this is the code, because when i comment it out, no error occurs.

bool Repeat()
{
cout << "would you like to append your order (y/n)?";
char Msg[80]; strset(Msg,'' '');
cin >> Msg;
char Choice = Msg[0];
return ( Choice == ''y'');
}//Repeat rbool

the funny thing, though, is that the error occurs when main terminates.

*****************************************
i managed to fix the problem by re-writtin Repeat,

bool Repeat()
{
cout << "would you like to append your order (y/n)?";
char Choice =0;
cin.get(Choice);
return ( tolower(Choice) == ''y'');
}//Repeat rbool

Share this post


Link to post
Share on other sites