I\'ve started coding in C++, coming from a Java background (actually I\'d studied C++ at my university, but we never got to the STL etc.)
Anyway, I\'ve gotten to the
The C++ standard library (note: it's not called the STL) has many existing container types: vector, array, deque, forward_list, list, set, map, multiset, multimap, unordered_set, unordered_map, unordered_multiset, unordered_multimap, stack, queue, priority_queue. Chances are, you just want to use one of these directly - you certainly never want to derive from them. However, it's certainly possible that you may need to implement your own special container type at some point, and it would be nice if it matched some interface, right?
But no, there aren't some abstract base classes that the containers derive from. However, the C++ standard provides requirements for types (sometimes known as concepts). For example, if you look at section §23.2 of the C++11 standard (or here), you'll find the requirements for a Container. For example, all containers must have a default constructor that creates an empty container in constant time. There are then more specific requirements for Sequence Containers (like std::vector) and Associative Containers (like std::map). You can code your classes to meet these requirements and then people can safely use your containers as they would expect to.
Of course, there are requirements for many things other than containers. For example, the standard provides requirements for different types of iterators, random number generators, and so on.
A number of people on the ISO C++ committee (Study Group 8, in fact) are looking into making these concepts a feature of the language. The proposal would allow you to specify requirements for types that need to be met for them to be used as template type arguments. For example, you would be able to write a template function a little like this:
template
void foo(C container); // This will only accept sequence containers
// or even just:
void foo(Sequence_container container);
However, I'm thinking this is currently beyond your understanding of C++.