![]() |
VOOZH | about |
The unordered_multiset::insert() is a built-in function in C++ STL that inserts new elements in the unordered_multiset. This increases the container size. Also notice that elements with the same value are also stored as many times they are inserted.
Syntax:
Unordered_multiset_name.insert(element)
Parameters: This function accepts a single parameter element. It specifies the element which is to be inserted into the container.
Return value: The function returns an iterator to the newly inserted element.
Below programs illustrate the above function:
Program 1:
ums contains: papaya pineapple mango cherry grapes banana apple apple orange
Program 2:
ums contains: 8 7 9 3 2 4 4 6 5