i'm not sure if a pointer can do the job of an iterator, or otherwise, or they are different things?
admiri92 0
Newbie Poster
Recommended Answers
Jump to PostPointers are iterators (random access iterators to be specific) and they are in fact commonly used as such. For example
std::vector<T>
usesT*
in most (possibly all) implementations (except in the case ofvector<bool>
, which is a special case).On the other hand there are many iterators that aren't pointers. …
All 3 Replies
sepp2k 378
Practically a Master Poster
deceptikon 1,790
Code Sniper Team Colleague Featured Poster
Moschops 683
Practically a Master Poster Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.