What is "map" in STL?

Showing Answers 1 - 6 of 6 Answers

dasam

  • Apr 12th, 2007
 

"map" is the hash table implementation in STL (Standard Template Library).

Different types of 'map' are available in STL container class.
(a) map
(b) multimap

  Was this answer useful?  Yes

satish_sudi

  • Jun 25th, 2007
 

Map is associated type of container type defined in STL. Which store the pair of values as element as "Key" and "Value".
Ex: Pair of elements like PersonName:IDno can be stored in maps as

person1 - 1001
person2 - 1002
person3 - 1003

Here the PersonName is key to find the IDno.

The map is very much useful, in case of directory type of data storage, like telephone directory, Book Ids, etc

STL provides various algorithms to do search, sort, etc on the map elements.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.