VOOZH about

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

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


  • Courses
  • Tutorials
  • Interview Prep

unordered_multimap cend() function in C++ STL

Last Updated : 8 Aug, 2018
The unordered_multimap::cend() is a built-in function in C++ STL which returns a constant iterator pointing to the position after the last element in the container or to the position after the last element in one of its bucket. Syntax:
unordered_multimap_name.cend(n)
Parameters: The function accepts one parameter. If a parameter is passed, it returns a constant iterator pointing to the position after the last element in one of its bucket. If no parameter is passed, then it returns a constant iterator pointing to the position after the last element in the unordered_multimap container. Return Value: It returns a constant iterator. It cannot be used to modify the key and element of the unordered_multimap element. Below programs illustrates the above function: Program 1:
Output:
Key and Elements:
 2 3
 2 3
 1 2
 3 4
 3 4
Program 2:
Output:
Key and Elements of first bucket:
 1 2
Comment