Skip to content

W) Iterators

kalinosia edited this page Mar 16, 2021 · 1 revision

What is a niterator?

Type that can be used to identify and traverse the elements of a container. Container provides iterator. Iterator does not know about container type it originates from.

Iterators can be thought of as an abstraction of pointers.

  • Iterators have „star” operator – „*iter” is valid expression
  • Iterators have „arrow” operator – „iter->” is valid expression

https://en.cppreference.com/w/cpp/iterator

Clone this wiki locally