The standard template library (STL) contains three major interconnected parts:
Containers: template classes that are responsible for flexibly managing collections of values of arbitrary type.
Iterators: template classes that allow us to traverse and access elements in the container classes in a manner independent of both collection types and the element type.
Algorithms: template functions and classes that provides common algorithms over containers, with minimal dependence on the element or container type.
It would be impossible to give even a mildly comprehensive overview of the STL in this class. Instead, we will walk through the usage of one container, with its associated iterator, and two algorithms.
The template std::vector is a vector with operations that have the efficiency you would expect for a dynamic array implementation. That is, insertion at the beginning or middle is O(n), whereas insertion at the end and indexing are roughly constant time.
The actual definition of std::vector uses advanced C++ features that we haven't covered yet. Therefore, the following is a rough approximation of the class, "translated" into features you already know:
template vector { public: vector(); vector(const vector&); ~vector(); vector& operator=(const vector& x); // range-checked and non-range-checked element access T& at(int index); T& operator[](int index); // Stack-like operations. T& front(); T& back(); void push_back(T value); void pop_back(); // ... and lots more };