/*Orion Lawlor's Simple STL Examples, olawlor@acm.org
Shows how to use std::map.
*/
#include <iostream>
#include <map>

int main()
{
	typedef std::map<std::string,int> m_type;
	m_type map;
	map["foo"]=3; /* Add value at "foo" index */
	map["bar"]=4;
	map["bar"]=5; /* Replace value at "bar" index */
	std::cout<<"map[foo]="<<map["foo"]<<std::endl;
	std::cout<<"map[bar]="<<map["bar"]<<std::endl;
	std::cout<<"map[baz]="<<map["baz"]<<std::endl;
	return 0;
}
/*<@>
<@> ******** Program output: ********
<@> map[foo]=3
<@> map[bar]=5
<@> map[baz]=0
<@> */
