Looking at arrays with Debugger
-
I want to use the debugger to check if my arrays are filled correctly. I have two arrays, double xcoord1[80]; CPoint coord[80]; When I debug, I place my breakpoint right after I fill these arrays (still in the same function). Then I bring up the "Watch" debug window. But when I type xcoord1 under the name, i get the message: error in OMF type information. And when I type coord, I get this under value: 0x0066f288 Why is all this happening?? And I know my array's have filled up properly, because if I put them to an oufile, I see that all the numbers I want are there. But why can't I view them with the debugger???
-
I want to use the debugger to check if my arrays are filled correctly. I have two arrays, double xcoord1[80]; CPoint coord[80]; When I debug, I place my breakpoint right after I fill these arrays (still in the same function). Then I bring up the "Watch" debug window. But when I type xcoord1 under the name, i get the message: error in OMF type information. And when I type coord, I get this under value: 0x0066f288 Why is all this happening?? And I know my array's have filled up properly, because if I put them to an oufile, I see that all the numbers I want are there. But why can't I view them with the debugger???
There's an article relating to some old versions of VC in MSDN that might help - I've never seen this problem myself: "FIX: CXX0033 Error in OMF Type from Forward Class Declaration" Seems to be a problem with the program database file when fwd decls used. What version of VC are you using?
-
There's an article relating to some old versions of VC in MSDN that might help - I've never seen this problem myself: "FIX: CXX0033 Error in OMF Type from Forward Class Declaration" Seems to be a problem with the program database file when fwd decls used. What version of VC are you using?
-
I want to use the debugger to check if my arrays are filled correctly. I have two arrays, double xcoord1[80]; CPoint coord[80]; When I debug, I place my breakpoint right after I fill these arrays (still in the same function). Then I bring up the "Watch" debug window. But when I type xcoord1 under the name, i get the message: error in OMF type information. And when I type coord, I get this under value: 0x0066f288 Why is all this happening?? And I know my array's have filled up properly, because if I put them to an oufile, I see that all the numbers I want are there. But why can't I view them with the debugger???
I don't know about the error in OMF type information thing, but the second value is correct. When you declare CPoint coord[80], coord actually becomes a (CPoint *) pointing to a block of 80 CPoint values. Therefore, when you view coord, it will display the address of the start of this memory block. There are two ways to look at the values in this array: Add coord[0] or coord[53] to the Watch window to look at individual elements of this array, or copy 0x0066f288 to the Memory Debug window and look at the raw memory bytes (not so easy!). Hope this helps. ------------------------ Derek Waters derek@lj-oz.com
-
I want to use the debugger to check if my arrays are filled correctly. I have two arrays, double xcoord1[80]; CPoint coord[80]; When I debug, I place my breakpoint right after I fill these arrays (still in the same function). Then I bring up the "Watch" debug window. But when I type xcoord1 under the name, i get the message: error in OMF type information. And when I type coord, I get this under value: 0x0066f288 Why is all this happening?? And I know my array's have filled up properly, because if I put them to an oufile, I see that all the numbers I want are there. But why can't I view them with the debugger???
You should be able to enter xcoord1,80 in the watch window to see all 80 elements of your array. Assuming you have managed to clear the OMF error problem. I would recommend getting the book Debugging applications by John Robbins which gives lots of hints etc on how to get he most from your code and the IDE debugger. Roger Allen Sonork 100.10016 If I'm not breathing, I'm either dead or holding my breath. A fool jabbers, while a wise man listens. But is he so wise to listen to the fool?