Answers

Question and Answer:

  Home  C++ Containers

⟩ Tell us what you know about Iterator class?

A container class hold group of objects and iterator class is used to traverse through the objects maintained by a container class. The iterator class provides access to the classes inside a container. They are objects that point to other objects. Iterator points to one element in a range, and then it is possible to increment it so that it points to the next element.

There are several different types of iterators:

input_iterator

output_iterator

forward_iterator

bidirectional_iterator

random_iterator

reverse_iterator

 184 views

More Questions for you: