Chapter 15. Introduction to STL (vector, deque)
When the template-creation facility was introduced into C++, it promised to save programmers a great deal of work.
Someone, of course, had to write the templates. But since the first generation or two of C++, compiler vendors have provided a Standard Template Library (STL) that takes care of many of the most common programming tasks: searching, sorting, inserting, and deleting.
Much of the STL consists of containers, which are collections built around a type you specify. Each of the containers—there are different kinds and each has its pros and cons—comes with many built-in capabilities.
This chapter begins with a guided tour of the container templates, providing an overview of what kinds are best ...
Get C++ for the Impatient now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.