March 6th, 2004, 06:24 PM
How to watch a CTypedPtrArray ?
I'v tried this before, but couldn't get it to work. For a piece of software I'm working on now it would be very nice if I could watch the contents of a CTypedPtrArray, but something in VS.NET doesn't seem to wanna do this...
With a regular CArray things are easy enough...
If you wanted to watch the first 4 items, you'd add a watch for:
CArray <MyClass, MyClass&> m_aMC;
Even a watch from somewhere in the middle isn't a problem.
Even if you created the CArray to store pointers (with: CArray <MyClass*, MyClass*> m_aMC, somewhat simulating the working of CTypedPtrArray) things work well.
But, suppose I did
CTypedPtrArray <CPtrArray, MyClass*> m_aTP;
Then I can't seem to be able to add a watch to more than 1 item at a time.
Watching the 3rd element can be done with adding a watch for:
But adding an amount as in
gives me a correct result only for the first element listed, the others aren't correct.
Anyone have a clue as to how to do this ?
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!