VOOZH about

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

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


  • Courses
  • Tutorials
  • Interview Prep

unordered_multimap size() function in C++ STL

Last Updated : 21 Aug, 2018
The unordered_multimap::size() is a built-in function in C++ STL which returns the size of the unordered_multimap. It denotes the number of elements in that container. Syntax:
unordered_multimap_name.size()
Parameters: The function does not accept any parameters. Return Value: It returns an integral values which denotes the size of the containers. Below programs illustrates the above function: Program 1:
Output:
The size of Sample1 is: 2
Key and Elements of Sample1 are:{50, 500} {10, 100} 

The size of Sample2 is: 3
Key and Elements of Sample2 are:{20, 200} {30, 150} {30, 300}
Program 2:
Output:
The size of Sample1 is: 2
Key and Elements of Sample1 are:{g, G} {a, A} 

The size of Sample2 is: 3
Key and Elements of Sample2 are:{d, D} {b, B} {c, C}
Comment