How are iterators and pointers related?
Posted
by sharptooth
on Stack Overflow
See other posts from Stack Overflow
or by sharptooth
Published on 2010-04-28T09:26:57Z
Indexed on
2010/04/28
9:33 UTC
Read the original article
Hit count: 250
Code with iterators looks pretty much like code with pointers. Iterators are of some obscure type (like std::vector<int>::iterator
for example).
What I don't get is how iterators and pointer are related to each other - is an iterator a wrapper around a pointer with overloaded operations to advance to adjacent elements or is it something else?
© Stack Overflow or respective owner