MFC app doesn't work in debug mode, works in release mode
-
OK, I am writing an MFC app using Visual C++ 6. The problem is, my program works in the release mode, but it doesn't work in the debug mode (yes, NOT the other way around!). I traced the problem, and it seems that the problem stems from one of my classes, which has a member variables like: private: .... some other things... float number1[30]; float number2[30]; In this class' initialization, I use a for loop to initialize this array to all zeroes. The problem is, it seems that number2's address space overlaps with some other variables, and this overlap corrupts my program, causing some access violation (not debug assertion). This does not happen in the release mode. Could someone point to me how I can deal with this problem? Thanks!
-
OK, I am writing an MFC app using Visual C++ 6. The problem is, my program works in the release mode, but it doesn't work in the debug mode (yes, NOT the other way around!). I traced the problem, and it seems that the problem stems from one of my classes, which has a member variables like: private: .... some other things... float number1[30]; float number2[30]; In this class' initialization, I use a for loop to initialize this array to all zeroes. The problem is, it seems that number2's address space overlaps with some other variables, and this overlap corrupts my program, causing some access violation (not debug assertion). This does not happen in the release mode. Could someone point to me how I can deal with this problem? Thanks!
Are you looping from 1 to 30, or from 0 to 29 ? Christian I have drunk the cool-aid and found it wan and bitter. - Chris Maunder