Guest yatpeak Posted March 4, 2004 Report Posted March 4, 2004 Hey all, Can anyone see a problem with the following code? if(setup.DoModal() == IDOK) { switch(setup.ScenYes.GetCheck()) { case 0: MessageBox("0"); break; case 1: MessageBox("1"); break; } } The program compiles and when I run it I can get the dialog to load, but as soon as I press the OK button I get a big error window which says: Debug assertion failed! Program: ...dio ProjectsMoneyMadnessMoneyMadnessDebugMoneyMadness.exe File: f:vs70builds3077vcMFCATLshipatlmfcincludeafxwin2.inl Line: 613 For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts. (Press retry to debug the application)The documentation on asserts says: An assertion statement specifies a condition that you expect to hold true at some particular point in your program. If that condition does not hold true, the assertion fails, execution of your program is interrupted, and this dialog box appears. When I press retry(and it debugs) I get a message about the line 'switch(setup.ScenYes.GetCheck())' which says : Unhandled exception at 0x7c29103b (mfc71d.dll) in MoneyMadness.exe: User Breakpoint. Thanks in advance for any light you can shed on this problem, Wyatt
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now