Debug CArray
-
Call be a fool and laugh, if y want, but is there a simple way that I can see the elements of a CArray in the MSC++ de bugger? Ta Dave.
-
Call be a fool and laugh, if y want, but is there a simple way that I can see the elements of a CArray in the MSC++ de bugger? Ta Dave.
If it's anything like a vector, you should be able to drop down the element and get the memory address of your data at least. Then if it's text you can use the memory viewer. I'll add my obligatory comment on CArray - it's a pile of crap. Consider using std::vector instead. Christian We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum ) Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
-
Call be a fool and laugh, if y want, but is there a simple way that I can see the elements of a CArray in the MSC++ de bugger? Ta Dave.
David Carkeet wrote: Call be a fool and laugh, if y want, but is there a simple way that I can see the elements of a CArray in the MSC++ de bugger? Yes there is. :) In the "Watch" window(if you don't see it just right click in the debugger and it will bring up the option), type the name of the array and all the values will be listed. What I do is insert a breakpoint at the place after the array is filled and then start the debugger. Once you have reached the breakpoint type the array's name in the "Watch" window and then presto, your elements will be listed. Hope that helps.
-
David Carkeet wrote: Call be a fool and laugh, if y want, but is there a simple way that I can see the elements of a CArray in the MSC++ de bugger? Yes there is. :) In the "Watch" window(if you don't see it just right click in the debugger and it will bring up the option), type the name of the array and all the values will be listed. What I do is insert a breakpoint at the place after the array is filled and then start the debugger. Once you have reached the breakpoint type the array's name in the "Watch" window and then presto, your elements will be listed. Hope that helps.
Well, teach a mangy old dog new tricks. I didn't know the Watch window was that smart! Thanks!:-O:-O:-O:-O Gary R. Wheeler
-
If it's anything like a vector, you should be able to drop down the element and get the memory address of your data at least. Then if it's text you can use the memory viewer. I'll add my obligatory comment on CArray - it's a pile of crap. Consider using std::vector instead. Christian We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum ) Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002