Go back to Richel Bilderbeek's homepage.
Go back to Richel Bilderbeek's C++ page.
STL container for mapping two kinds of data types.
The std::string is the key (in this case a last name) and the int is termed the value (in this calse the persons telephone number).
One key can only have one value. If a key needs to have one or more values, use a std::multimap.
Note that among these are also more general container code snippets.
* IsKeyInMap, checks if a key is in a std::map
* GetValueInMap, get a value in a std::map
* Check if a key is in a std::map, IsKeyInMap
* Get a value in a std::map, GetValueInMap
*
LoopReader, reading a container looped
* Reading a container looped, LoopReader
*
'operator+'
not implemented in type 'std::map<int,double>' for arguments of type
'int'
* Wikipedia: http://en.wikipedia.org/wiki/Map_(computer_science)
* SGI: http://www.sgi.com/tech/stl/Map.html
* CodePedia: http://www.codepedia.com/1/CppMap