What’s the best design for building an iterator that has to iterate further within the operator++ on a dynamically allocated list.
Meaning, for example, that I want the operator++ to go to the next element with some arbitrary property. i.e. the iterator may go forward more than one element.
Is storing the size of the list inside the iterator class proper design?
Aucun commentaire:
Enregistrer un commentaire