C++std::set and std::multiset

Introduction

set is a type of container whose elements are sorted and unique.  multiset is similar, but, in the case of multiset, multiple elements can have the same value.

Remarks

Different styles of C++ have been used in those examples.  Be careful that if you are using a C++98 compiler; some of this code may not be usable.