A container class provides built-in features and procedures that let you handle stored data, find the number of stored objects, insert new objects, and so on.The container class includes general-purpose classes, such as stacks, lists, and queues in which the maintenance of the container is generic but the item in the container is specific.
You can use the basic built-in C++ types as well as objects that have public copy constructors and assignment operators.
There are 11 types of container classes as shown in the following list:
1. List — Supports a doubly linked list of data items; each item knows which item comes before and after it.
2. Queue — Supports a queue that lets you add elements at the back end and remove them from the front end. This container is more restrictive than a deque.
3. Deque — Supports a double-ended queue, and it also lets you access those elements randomly.
4. Priority_queue — Supports a prioritized queue that stores its items in a sorted order.
5. Stack— Supports a stack of items, with methods like push and pop.
6. Vector— Supports a one-dimensional array.
7. Map— Supports a collection of keys and values associated with the keys. The key and values can be of different types.
8. Multitap —Supports a map that can support multiple values for each key.
9. Set—Supports a sorted set of unique members.
10. Multiset— Supports a set that can support multiple values per key.
11. Bitset— Refers to a data construct that allows you to set, reset, and check individual bits.
No comments:
Post a Comment