O'Reilly logo

Just Enough C/C++ Programming by Guy W. Lecky-Thompson

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

STL Algorithms

The STL algorithms exist to offer functions that can operate on ranges and single elements in a way that is type-nonspecific. Each function that makes up the algorithms collection is designed to be used to iterate through a range, select from a range, modify a range, or provide miscellaneous single-element generic functions.

STL algorithms can be used with the template classes (vector, queue, list, and so on) or they can be used with built-in types that support ranges (arrays, for example). Some can also be used with individual elements based on user-defined classes, built-in types, or elements obtained from STL container classes.

This discussion classifies the STL algorithms into the following areas:

  • Non-modifying

  • Modifying

  • Searching ...

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