Vectors are sequence container (same as dynamic arrays) which resizes itself automatically. The size changes (i.e. vector can shrink or expand as needed at run time) when an element is inserted or deleted, with their storage being handled automatically by the container. Just like arrays, vector elements are placed in adjacent memory locations so that they can be accessed and traversed using iterators i.e. subscript operator .
The C++ Standard Library provides lots of built-in functionality in the form of the Standard Template Library (STL). The STL was created as the first library of generic algorithms and data structures for C++, with four ideas in mind.