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
Rated as one of the most sought after skills in the industry, own the basics of coding with our C++ STL Course and master the very concepts by intense problem-solving.
- multimap maxsize() in C++ STL
- map::at() and map::swap() in C++ STL
- Searching in a map using std::map functions in C++
- Descending order in Map and Multimap of C++ STL
- Map in C++ Standard Template Library (STL)
- Hash Table vs STL Map
- Map of pairs in STL
- Traversing a map (or unordered_map) in C++ STL
- map::clear() in C++ STL
- map::size() in C++ STL
- map::begin() and end() in C++ STL
- map::empty() in C++ STL
- map::operator in C++ STL
- map::at() in C++ STL
- Default values in a Map in C++ STL
- set vs map in C++ STL
- map emplace() in C++ STL
- map cbegin() and cend() function in C++ STL
- map crbegin() and crend() function in C++ STL
- map upper_bound() function in C++ STL
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. 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.