假设我有一个std::vector<Foo>
size 30
,Foo
结构定义为:
struct Foo {
int a,b,c,d,e,f,g,h,i,j,k,l,m; //many fields
// ...
};
是否可以仅“观察”g
向量所有元素的字段内容?
我认为 Watch Window 中的表达式如下:
(v)._Myfirst[$index].g
//v would be the variable holding the vector being debugged
就足够了。