Jump to content
  • Advertisement
Sign in to follow this  
bear78

Value of vector while debugging in VS

This topic is 4839 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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++.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!