VOOZH about

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

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


  • Courses
  • Tutorials
  • Interview Prep

unordered_multimap max_size() function in C++ STL

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