I've started using the standard template library recently, but I'm really having difficulty debugging my code. The "watch window" offers very little info on the contents of say vector.
Am I missing something simple? How do I see what it is holding?
Printable View
I've started using the standard template library recently, but I'm really having difficulty debugging my code. The "watch window" offers very little info on the contents of say vector.
Am I missing something simple? How do I see what it is holding?
What IDE are you using? What version?
Watching a vector or any other complex object is of course more difficult than looking at built-in types, but there are usually tricks you can use to get the information you need.
Microsoft Visual C++ .NET version 7
when you look at the vector in the watch window, you can get the ide to treat it as an array.
copy the vector from the 'locals' or 'this' window to the watch window. look for the _Myfirst var and add a ', 10' after it. this will tell the ide to treat it as an array of size 10 (insert your own size obviously)