0 votes
in C Plus Plus by
What is the difference between an External Iterator and an Internal Iterator? Describe an advantage of the External Iterator.

1 Answer

0 votes
by

An internal iterator is implemented with member functions of the class that has items to step through.

An external iterator is implemented as a separate class that can be bound to the object that has items to step through. The basic advantage of an External iterator is that it’s easy to implement as it is implemented as a separate class.

Secondly, as it’s a different class, many iterator objects can be active simultaneously.

Related questions

0 votes
asked Mar 14, 2021 in Web Hosting by SakshiSharma
0 votes
asked Apr 13, 2022 in SAP ABAP by john ganales
...