Value of vector while debugging in VS

Started by
5 comments, last by bear78 18 years, 8 months ago
I've searched the forum and on google but without any success. Is there a way to display the value of the actual elements in a stl vector while debugging in VS 6 / 2k3?
Advertisement
Assuming you haven't changed the STL implementation that your compiler ships with, with MSVC 2003 you can use a watch expression of ((vec)._Myfirst)[n] to see the nth item in the vector.
Did you mean like this for example:

((m_ServerToClientSocketVector)._Myfirst)[0]

right after I've done
m_ServerToClientSocketVector.push_back(tmpInfo);

I get this error as value in the watch tab:
error: managed EE does not understand expression's syntax

My code is non managed c++.
There is also an Add-In that claims to fix this, altough I haven't tried it out yet.
___________________________Buggrit, millennium hand and shrimp!
Sweet, I will try it out.

Thanks for the quick reply!
Actually I meant in a watch window, like the quick watch: Ctrl-Alt-Q.
Quote:Original post by SiCrane
Actually I meant in a watch window, like the quick watch: Ctrl-Alt-Q.


I get the same error when I add

((m_ServerToClientSocketVector)._Myfirst)[0]

to the quick watch-window. Any idea why?

This topic is closed to new replies.

Advertisement