O'Reilly logo

Sams Teach Yourself C++ in One Hour a Day, Sixth Edition by Bradley Jones, Siddhartha Rao, Jesse Liberty

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 20. STL set and multiset

The standard template library (STL) supplies the programmer with container classes that help with applications requiring frequent and quick searches.

In this lesson, you will learn

  • An introduction to the STL set and multiset

  • Basic STL set and multiset operations

  • Advantages and disadvantages in using these containers

An Introduction

The set and multiset are containers that facilitate a quick lookup of keys in a container that stores them; that is, the keys are the values stored in the one-dimensional container. The difference between the set and the multiset is that the latter allows for duplicates whereas the former can store only unique values.

Figure 20.1 is only demonstrative and indicates that a set of names contains ...

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