Strange behaviour when put directplay in C++ class

Started by
0 comments, last by Ejaz 20 years, 9 months ago
Dear All, I''m trying to wrapup directplay in my class for peer-peer communication. I did and its working fine, but there is a strange behaviour. When I create an instance of my peer class and after that display a dialog box, to take inputs from user, so that they can be set in the SetPeerInfo(...), everything works fine, but when I close the application, it gives error that "user break point at bla bla bla". On the other hand, if I display the dialog first, take input, put them in some global structure, destroy that dialog, and after that get info from that global structure and proceeds, then everything works perfectely. I searched the net about this "user breakpoint error", all I get was that compiler put extra code in the debug verion (int 3 of 1 byte), which is used in cases where the application crashes unexpectedly. The solution I got was to check all the variables, I did and find nothing suspected, but the problem is still there. All my progress is stuck because of this error. Does anyone have this problem too. I''ll appriciate any help in this matter & thanx in advance. Regards, Ejaz.
Advertisement
This can happen if you''re trashing memory somewhere. Check that you set pointers to NULL after freeing/deleting them, and that you''re not overwriting the end of some array.

Why you shouldn''t use iostream.h - ever! | A Good free online C++ book

This topic is closed to new replies.

Advertisement