Chapter 18. STL Algorithms

Much of computer programming comes down to standard tasks such as sorting, searching, counting, and selecting items from a collection. The STL algorithms are function templates that perform these general functions on nearly any kind of data and most any kind of collection: standard C++ arrays as well as any of the collection classes.

After presenting some general concepts, this chapter summarizes the STL algorithm templates by category—there are quite a number of them! Then it describes all of the templates in detail, in alphabetical order.

18.1. STL Algorithms: General Concepts

Most of the STL algorithm templates require the <algorithm> header. A few of them, called “numeric” algorithms, require the use of the <numeric> ...

Get C++ for the Impatient now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.