stl - Conveniently view vector's content if iterator given -


is there convinient way see vector's content if need debug program in visual studio 2013 uses function signatures this:

void foo(iterator begina, iterator enda); 

in case have vector<int> a can see inside of vector. if given iterator, then, debug purpose, need declare vector see inside, or there exists easier way?

try begina._ptr,10 in watch window. relies on implementation detail of iterator (that has member called _ptr), , ,10 syntax in watch window means "treat pointer array address , show me 10 elements of array". can put arbitrary number there, doesn't have 10, of course.

hth


Comments

Popular posts from this blog

javascript - ScrollTo Effect (href to div) -

javascript - ng-class not responding to change in model in Angular? -

javascript - document.registerElement extending HTMLInputElement prototype while using custom tag name to avoid implicit browser style -