Chapter Summary
Among the most important library types are vector
and string
. A string
is a variable-length sequence of characters, and a vector
is a container of objects of a single type.
Iterators allow indirect access to objects stored in a container. Iterators are used to access and navigate between the elements in string
s and vector
s.
Arrays and pointers to array elements provide low-level analogs to the vector
and string
libraries. In general, the library classes should be used in preference to low-level array and pointer alternatives built into the language.