First, an apology: I've read some previous threads about inspecting templates in VS (e.g. this one); unfortunately they either did not contain the information I need or (more likely) I was not able to extract the information successfully from the answers. I hope I'm not asking something too obvious that has been asked many times before.
I have a vector containing objects of class SomeClass:
class SomeClass {
int a, b;
//constructor..
};
std::vector<SomeClass> vec;
//vec.push some elements..
Now I want to be able to watch vec[0].a, vec[1].a, .... in the VS2010 debugger. When I naively try this I ofcourse get:
vec[0].a CXX0058: Error: overloaded operator not found
And when I try one of the solutions offered in the answers to the question I linked to above, I get:
((vec)._Myfirst)[0].a CXX0025: Error: operator needs class/struct/union
So I understand I need to modify autoexp.dat. I tried doing this for a while with no success whatsoever.
I would really appreciate it if someone could write what line/s I need to add to autoexp.dat in order to be able to inspect these variables (I already feel that I've spent way too much time on this - and so I would be very grateful if I could get an explicit solution rather than hints or links).
Thank you for your time.