The Standard Template Library

The Standard Template Library
STL Components
Containers
Iterators
Algorithms
Containers
Sequence containers
vector
deque
list
Associative containers
set
multiset
map
multimap
Sequence Containers
Vectors
dynamic array
fast
appending
remove last element
the end of array
slow
insert in the middle
insert at the beginning
remove the middle element
remove the first element
not the end of array
Deque
dynamic array
fast
insert at the end and beginning
remove at the end and beginning
both end of array
slow
insert elements in the middle
remove elements in the middle
in the middle of array
List
double link list
advantage
insertion
removal
disadvantage
navigate
travel
Strings
basic_string<>
string
wstring
Ordinary Arrays
Associative Containers
sets
multiset
map
multimap
Container Adapters
Stacks
Queues
Priority Queues
Iterators
operator*
operator++
operator--
operators== and !=
operator=
Iterator Categories
Bidirectional iterator
list
set
multiset
map
multimap
Random access iterator
vector
deque
Algorithms
Iterator Adapters
Insert Iterator
front_inserter
back_inserter
inserter
Stream Iterator
Reverse Iterator
Function Objects
for_each
definition
advantage
Function objects are "smart functions."
each function object has its own type
function objects are usually faster than ordinary functins
Container elements
requirement for container elements
An element must be copyable by a copy constructor
An element must be assignable by the assignment operator
An element must be destroyable by a destructor
the default constructor must be available
the test of quality with operator == must be defined
for associative containers the operation of the sorting criterion must by provided by the elements.
value semantics or reference semantic
Main Topic
4