The etherator for the door"

Asked 2 years ago, Updated 2 years ago, 90 views

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

2022-09-20 21:42

1 Answers

Because end() returns an iterator located one space after the last value in the list, it outputs all values.


2022-09-20 21:42

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.