
Iterator pointing to the element or a pair of If yourĬollection contains pointers the elements must beĮrase Erase an element or range of elements from aĬollection. To test if an iterator is valid or in looping overĬlear Erases all elements in a collection. Rend Returns a backward iterator pointing to one before The collection It is commonly used to iterate

Rbegin Returns a backward iterator pointing to the end of Test if an iterator is valid or in looping over a It is commonly used to iterateĮnd Returns a forward iterator pointing to one past Size Determines the number of elements in theīegin Returns a forward iterator pointing to the start #include STL Collections General Class Methods empty Determines if the collection is empty Is stored as a bi-directional linked list ofĮlements, each containing a member of type T. Vector A collection of elements of type T. Have queued based processing, such as a message based Theĭeque collection is excellent for use in systems that When an associative type of collection is needed.

The vector class is ideal for simple andĬomplex collection types, while the map class is used Past experience, the vector and map classes are the

What type ofĬollection you use is up to your needs and tastes. Parameters, which will be discussed later. Here we have declared a template-based class thatĮach STL collection type has its own template
