{"id":255,"date":"2015-10-06T18:21:55","date_gmt":"2015-10-06T15:21:55","guid":{"rendered":"https:\/\/sobbayi.com\/?p=255"},"modified":"2015-10-06T18:21:55","modified_gmt":"2015-10-06T15:21:55","slug":"cpp-standard-template-library-vector-sequence-containers","status":"publish","type":"post","link":"http:\/\/local.brightwhiz\/cpp-standard-template-library-vector-sequence-containers\/","title":{"rendered":"The C++ Standard Template Library Vector Sequence Container – Part 2"},"content":{"rendered":"
In this article, which is the second in the C++<\/a> Standard Template Library series we will be taking a look at Containers and to be more precise we will be looking into the Vector Sequence container.<\/p>\n In the first article from the C++ Standard Template Library series<\/a> we took a general overview of what the Standard Template Libra<\/a>ry is and we discussed the different components that make up the library.<\/p>\n We were able to introduce the concept of containers, algorithms and the data structures and how they all inter-operate together. If that is all new to you then I would advise you to go and read on the overview of the C++ Standard Template Library<\/a> before proceeding with this article.<\/p>\n If you already read the first part of this series then you are in the right place and you may proceed.<\/p>\n Even though there are more, Containers in the C++ Standard Template Library can be classified into three major types namely:<\/p>\n Sequence Containers<\/strong> are basically implemented as arrays and linked lists. STL provides the vector, list, forward list, deque and array classes to handle these kinds of containers. One example is the Vector Sequence Container.<\/p>\n Associative containers<\/strong> generally implement the binary tree and are composed of set, multiset, map and multimap classes in C++ STL.<\/p>\n Unordered Containers<\/strong> generally make use of hash tables. STL provides classes for the unordered set, unordered multiset, unordered map, and unordered multimap.<\/p>\n In this article, we will cover the vector from the first category of Sequence Containers.<\/p>\n In order to use any of the Standard Template Library classes, the C++ programmer is required to include the relevant header files that contain the declaration of the needed classes.<\/p>\nThe Types of Containers in the C++ Standard Template Library<\/h2>\n
\n
Sequence Containers<\/h2>\n