Javatpoint Logo
Javatpoint Logo

Multimap find() in C++ STL

As we all know, the C++ programming language has many in-built functions to help us avoid writing long lines of code. One such function is the multimap find function available in the rich library of C++ programming language, the Standard Template Library(STL). It will help us return an iterator which refers to or points to the position of the key containing the data traversal in the long or small multimap we have created. Suppose you have a different objective of knowing all the fundamental data values. In that case, you can refer to the equal range function available for us in the rich library of C++ programming language, the Standard Template Library(STL).

Multimap in C++

Output:

The multimap gquiz1 is : 
	KEY	ELEMENT
	1	40
	2	30
3	60
	6	50
	6	10


Multimap quiz1 after adding the extra elements is : 
	key	element
	1	40
	2	30
	3	60
	4	50
	5	10
	6	50
	6	10


The multimap gquiz2 after assignment from gquiz1 is : 
	KEY	ELEMENT
	1	40
	2	30
	3	60
	4	50
	5	10
	6	50
	6	10


 quiz2 after the removal of elements less than key = 3 : 
	 key 	 element 
	3	60
	4	50
	5	10
	6	50
	6	10

 quiz 2.erase(4) : 1 removed 
	key	element
	3	60
	5	10
	6	50
	6	10

the quiz1.lower bound (5) : 	key = 5		element = 10
the quiz1.upper bound (5) : 	KEY = 6		element = 50

Multimap find() in C++ STL

Syntax

C++ code

Output:

The elements from position 3 in multimap are : 
Key	elements : 
31	210






Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA