C++ STL map
C++ examples for STL:map
HOME
C++
STL
map
Description
Click the following links for the tutorial for STL and map.
Store object to map and use object as key
Associating Objects with map
Containing Instances and Needing Functions That Compare Them
Copying Containers
Creating a map to store user objects
Autocorrect Text as a Buffer Changes
Mapping strings to Other Things, Creating a string map
Using your own sorting functor
Using subscript to add value to map
Add key value pair to map, and loop through element in map
Demonstrate map used as associative array
Declare map that holds key/value pairs in which the key is a string and the value is an int.
Declare an iterator to a map<string, int> and get first element
Creates a map that works as a phone directory, in which a person's name is the key and the phone number is the value.
Remove all pair from map using clear()
Exchange the contents of two map
Remove pair from map by key
Compare two map for lexicographical compare, the first non-matching element in the container determines the order
Create pair from string and int, then add to map
Compare two map for equality
Create one map from another map
Find an element for its key in a map
Loop through element in map in reverse order
Get the size of map
Display content in map
Get last element from map