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 - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -