Jump to content
  • Advertisement
Sign in to follow this  
thedustbustr

vc71 debugger: visualizing arrays

This topic is 5097 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

int max=10;
int* array = new int[max];
for(unsigned int i=0;i<max;++i) array=i;
Is there an easy way to have the debugger output the contents of the entire array in the locals window instead of just *array (i.e. array[0])? Is this possible for STL containers also?

Share this post


Link to post
Share on other sites
Advertisement
You can't do it with STL containers, not in VS7 by default, although i did once install a plug in to display it.

Dave

Share this post


Link to post
Share on other sites
To view the contents of an array you can type this in a watch window:

array, N

N in this case is the number of indices you want to view. With an STL vector you could do this:

vector._Myfirst, N

Let me know if this helps.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!