it says cout<< *it;
why do we need to add * with it…
it says cout<< *it;
why do we need to add * with it…
Hey
This is because iterator is kind of a pointer pointing to that location/position of the element, to print the value of the element, we have to put *
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.