You have not indicated enough of your requirements to select the best container.
Dynamic size (theoretically unlimited, but in practice a couple of thousand should be more than enough)
STL containers are designed to grow as needed.
Ordered, but allows reordering and pasting in arbitrary places.
Allow reordering? It is not possible to reorder std :: map: you can delete from one std :: map and insert into another using a different order, but as different instances of the template, the two variables will have different types. std :: list has a member function sort() [thanks Blastfurnace for pointing this out], especially effective for large objects. A std :: vector can be easily used with the non-member function std::sort() , which is especially effective for tiny objects.
Effective pasting at random locations can be done on a map or list, but how do you find these locations? The search in the list is linear (you should start with what you already know and scan the element forward or backward by element). std :: map provides an efficient search, like an already sorted vector, but pasting into a vector involves moving (copying) all subsequent elements to create space: this is an expensive operation in the scheme of things.
Allows you to delete
All containers allow deletion, but you have the same performance problems as for insertion (for example, fast for a list, if you already know the location, fast for a map, deletion in vectors is slow, although you can βmarkβ the elements are deleted without deleting them, for example, if the string is empty, with a Boolean flag in the structure).
Indexed Access - Random Access
the vector is indexed numerically (but can be binary), display an arbitrary key (but not a numerical index). the list is not indexed and a linear search should be performed from a known element.
Count
std::list provides an O (n) size() function (so that it can provide an O (1) connection), but you can easily track the size yourself (assuming you won't merge). Other STL containers already have O (1) time for size() .
conclusions
Consider whether using std :: list will result in many inefficient linear searches for the desired item. If not, the list gives you efficient insertion and deletion. The sanctuary is good.
A map or hash map allows you to quickly find and easily insert / delete, cannot be used, but you can easily move data to another map with other sorting criteria (with moderate efficiency.
The vector allows you to quickly search and apply in place, but worse to insert / remove. It is the fastest for random access searches using the item index.