Initialising vector from array

The Visual C++ 2010 debugger displays the elements of array a

char * a[] = {"Josefin", "Josefin","Josef","Julius"};

in the order of definition. Nevertheless when it displays elements of the following vector

vector<string> v(a, a + sizeof a / sizeof a[0]);

the last element of array a has moved to the first position! Could somebody explain please?
You mean to say, the debugger does that, not the program.
Because I compiled your code and no elements are swapped when printing the contents of vector v.
Well at mine works also fine if that helps
Yes - I was talking about my debugger.
Thanks!
Topic archived. No new replies allowed.