what is the datatype of iterator it used in the program in the video here?
Datatype of it issue
Iterators can be smart pointers which allow to iterate over the complex data structures. A Container provides its iterator type.
Declaring iterator to a vector is like:(Here iterator type is vector< int >)
vector::iterator ptr;
Similarly if you want to declare iterator to a list of integers then it is like:
list::iterator ptr;
and so on…
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.