VOOZH about

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

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


  • Courses
  • Tutorials
  • Interview Prep

unordered_multimap empty() function in C++ STL

Last Updated : 8 Aug, 2018
The unordered_multimap::empty() is a built-in function in C++ STL which returns a boolean value. It returns true if the unordered_multimap container is empty. Otherwise, it returns false. Syntax:
unordered_multimap_name.empty()
Parameters: The function does not accept any parameter. Return Value: It returns a boolean value which denotes whether a unordered_multimap is empty or not. Below programs illustrates the above function: Program 1:
Output:
Key and Elements: {5:6} {3:4} {2:3} {1:2} {1:2} 
Container is empty
Program 2:
Output:
Key and elements: {r:e} {g:d} {g:d} {a:b} {a:b} 
Container is empty
Comment