C++ Language/ProgramFlow/Loops/LoopingOverCollection

Any STL collection that provides iterators via  and   (e.g.,  ) can be iterated by.

Additional information about looping over a collection (includes interactive examples)