成都创新互联网站制作重庆分公司

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://cxhlcq.com/article/ijjdgp.html

其他资讯

在线咨询

微信咨询

电话咨询

028-86922220(工作日)

18980820575(7×24)

提交需求

返回顶部