![]() |
VOOZH | about |
The unordered_multimap::emplace_hint() is a built-in function in C++ STL which inserts a new {key:element} in the unordered_multimap container. It starts searching from the position provided in the parameter for the insertion point of the element. The position only acts as a hint, it does not decide the position at which the insertion is to be done. The insertion is done automatically at the position according to the container's criterion. It increases the size of the container by one.
Syntax:
unordered_multimap_name.emplace_hint(iterator position, key, element)
Parameters: The function accepts three mandatory parameters which are described below:
Return Value: It returns an iterator that points to the newly inserted element.
Below programs illustrates the above function:
Program 1:
Key and elements:
{60:89}
{4:9}
{1:2}
{1:2}
{1:3}Program 2:
Key and elements:
{Multimap:functions}
{Geeks:Website}
{Geeks:STL}
{gopal:dave}
{gopal:dave}