O'Reilly logo

C++ for the Impatient by Brian Overland

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required