map stl Question 7

Last Updated :
Discuss
Comments

How can you retrieve all the elements with a given key in a std::multimap?

By calling the find() function multiple times until it returns an invalid iterator

By calling the search() function with the key as an argument

By calling the equal_range() function with the key as an argument

By calling the get() function with the key as an argument

Share your thoughts in the comments