The map::max_size() is a built-in function in C++ STL which returns the maximum number of elements a map container can hold.
Parameters: This function does not accept any parameters.
Return Value: This function returns the maximum number of elements a map container can hold.
The max size of mp1 is 461168601842738790 The max size of mp2 is 461168601842738790
- multimap maxsize() in C++ STL
- Find the number of p-sided squares in a grid with K blacks painted
- Find the Deepest Node in a Binary Tree Using Queue STL - SET 2
- C++ program to compare two Strings using Operator Overloading
- not1 and not2 function templates in C++ STL with Examples
- Go vs C++
- Trie Data Structure using smart pointer and OOP in C++
- Modular Exponentiation of Complex Numbers
- Minimum Bitwise XOR operations to make any two array elements equal
- std::hash class in C++ STL
- History of C++
- What are Forward declarations in C++
- __builtin_inf() functions of GCC compiler
- Structures in C++
- Variables in C++
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.