I am C++ beginner. When I try to debug C++ code using following constructs like string, vector of certain native types, STL etc, debugging gets tedious. I use MS Visual Studio 2010/ Visual C++ 2010 Express.
-- While using string as below:
As you have found out, trying to use overloaded operators in the watch window simply won't work. You need to break open the objects and pull out the member variables.
std::vector has a member variable
_Myfirst that points to the first element of its buffer. To get the item at index
i you can add
To the watch window. You can also use
To show the first 10 elements of the array.
There should be a similar member variable for