VOOZH about

URL: https://www.geeksforgeeks.org/cpp/unordered_multimap-find-function-in-c-stl/

⇱ unordered_multimap find() function in C++ STL - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

unordered_multimap find() function in C++ STL

Last Updated : 23 Feb, 2023

The unordered_multimap::find() is a built-in function in C++ STL which returns an iterator which points to one of the elements which has the key k. If the container does not contain any element with key k, then it returns an iterator which points to the position which is past the last element in the container. 

Syntax: 

unordered_multimap_name.find(k)

Parameters: The function accepts a mandatory parameter k which specifies the key. 

Return Value: It returns an iterator which points to the position where an element with key k is. 

Below programs illustrate the above function: 

Program 1: 

Output:
1:2
2:6
element with key 100 not found

Program 2: 

Output:
element with key r not found
a:d
b:d
Comment