i'm not sure if a pointer can do the job of an iterator, or otherwise, or they are different things?
Jump to Post
Pointers are iterators (random access iterators to be specific) and they are in fact commonly used as such. For example
T*in most (possibly all) implementations (except in the case of
vector<bool>, which is a special case).
On the other hand there are many iterators that aren't pointers. …
All 3 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.