Visualize vectors in VC

From GPWiki

Files:GUITutorial_warn.gif The Game Programming Wiki has moved! Files:GUITutorial_warn.gif

The wiki is now hosted by GameDev.NET at wiki.gamedev.net. All gpwiki.org content has been moved to the new server.

However, the GPWiki forums are still active! Come say hello.

In the standard library there are all kinds of various data collection types: lists, maps, vectors, etc. The problem with these is that you cannot see the contents easily in the QuickWatch of the Visual Studio IDE.

There is a very simple solution to this, which I've only tested with the vector type:

m_Shaders._Myfirst
 ^ This will show the contents of the first item (with zero as index) in the vector.

What if you want to see a different item? You can get a different index using:

m_Shaders._Myfirst[4]
 ^ This will show the fifth item in the vector.

If you want to see more items at the same time, simply try this:

m_Shaders._Myfirst,3
 ^ This will show the first 3 items in the vector

And that's it for this small article. I hope it's useful to some people. If you find additional information, please add it to this article.