STL Map look up

by ixmx


#include <map>
#include <string>
 
using namespace std;
 
string GetMapValue(const map<DWORD,string> & mymap, const DWORD key)const
{
	map<DWORD,string>::const_iterator cit = mymap.find(key);
	if(cit != mymap.end())
	{
		return cit->second;
	}
}
Advertisements