Usually, when outputting all values to the iterator, from for
for (iter=list.begin();iter!=list.end();iter++) cout<< *iter;
I understand it's written as... But it comes out as soon as it is iter=list.end() so can't you print out the value at the end?
iterator
Because end() returns an iterator located one space after the last value in the list, it outputs all values.
© 2024 OneMinuteCode. All rights reserved.