Different ways of Initializing multimap in C++

Multimaps in C++ STL are similar to maps in C++. The only difference is that maps cannot contain duplicate keys, whereas multimaps can contain multiple similar keys. It is a container that holds key-value pairs (like maps), and allows multiple entries with the same key.


Syntax for multimap :


template , //multimap::key_compare
class Alloc = allocator > //multimap::allocator_tpe
> class multimap;

The different ways to initialize multimaps are:



Method 1: Inserting usin...
 •  0 comments  •  flag
Share on Twitter
Published on May 28, 2020 15:44
No comments have been added yet.