The size() method of unordered_multiset is used to count the number of elements of unordered_set it is called with. It takes the number of elements in the container and counts the number of elements.
size_type size() const;
where size_type is an unsigned integral type.
Return Value: This function returns the length of the controlled sequence or in short, it returns the number of elements in the container.
Below program illustrate the unordered_multiset size() function :-
The container has 6 elements in it
It takes constant(O(1)) time of complexity to perform an operation.
- map::size() in C++ STL
- set::size() in C++ STL
- array::size() in C++ STL
- unordered_map size() in C++ STL
- bitset size() in C++ STL
- match_results size() in C++ STL
- CSS | background-size Property
- How to set checkbox size in HTML/CSS?
- Set the size of background image using CSS ?
- multiset size() in C++ STL with Examples
- unordered_set size() function in C++ STL
- multimap size() function in C++ STL
- list size() function in C++ STL
- CSS | font-size Property
- unordered_multimap size() 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.