1、定义
CMapStringToString g_mapSoundNames;//等价于map<CString, CString> g_mapSoundNames;
2、初始化//g_SysSoundNames_Normal[m_index]是数组作为键值KEY,g_SysSoundNames[m_index]数组作为VLAUE值
for(int m_index=0; m_index < SYS_SOUND_COUNT;m_index++)
{
g_mapSoundNames.SetAt(g_SysSoundNames_Normal[m_index],g_SysSoundNames[m_index]);
}
3、查找
CString strValue;
g_mapSoundNames.Lookup(strname,strValue);
return strValue;