C++ Language/Std/Stl/Iterators/BasicIterators
Appearance
An iterator is an object that reprsents a position within some collection class:void OutputVector(std::vector<int>& x) {
std::vector<int>::iterator piIter;
for (piIter = x.begin(); piIter != x.end(); ++piIter) {
int iVar = *piIter;
std::cout << iVar;
}
}
Additional information about basic iterators (includes interactive examples)