#include <afxtempl.h>
CMap<CString,LPCTSTR,CString,LPCTSTR>my_Map;
CString strKey = _T("");
CString strValue = _T("");
my_Map.SetAt("1","hello");//添加元素
CString pLook;
my_Map.Lookup("1",pLook);//查找元素
ShowMessage(pLook.GetBuffer(pLook.GetLength()));
int c = my_Map.GetCount();
my_Map.RemoveAll();//删除所有元素
bool re = my_Map.RemoveKey("1");//删除其中一个元素
c = my_Map.GetCount();//获取元素个数原文地址:http://9233403.blog.51cto.com/9223403/1970604