028-86922220
建站资讯

网站建设资讯

为你提供网站建设行业资讯、网站优化知识、主机域名邮箱、网站开发常见问题等。

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类使用
当前URL:http://whjierui.cn/article/ijjdgp.html

其他资讯