MFC中的CMap类使用

#include   
  
CMapmy_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();//获取元素个数

当前标题:MFC中的CMap类使用
文章链接:http://lszwz.com/article/ijjdgp.html

其他资讯

售后响应及时

7×24小时客服热线

数据备份

更安全、更高效、更稳定

价格公道精准

项目经理精准报价不弄虚作假

合作无风险

重合同讲信誉,无效全额退款