Understanding STL Containers
by Ben
This article is a really great way to start understanding STL containers. It discusses the differences between a vector and a deque (a double-ended queue) (you’ll often see C++ rookies as “what’s the difference between vector and queue” or something like that, and the answer is usually “if you have to ask, just use vector”. That is an insufficient answer for a lot of people, and this article addresses it nicely).
The long and short of it is that a vector represents a sequence of elements that are accessed in “random” fashion; not meaning that you access the elements randomly, but merely that you need to be able to access an element at any position in the list. This type of usage lends itself to a different storage structure and allocation strategy than does a queue, which is a sequence from which only the ends are accessed.
A good read.