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://csruizhi.cn/article/ijjdgp.html

其他资讯

Copyright © 2007-2024 成都优众联杰科技有限公司 All Rights Reserved 蜀ICP备2024116266号
友情链接: 定制网站设计 成都网站建设 成都网站设计 成都网站设计 成都网站建设 成都网站设计公司 商城网站建设 成都企业网站设计 成都网站设计 温江网站设计 网站建设费用 成都响应式网站建设公司 营销型网站建设 成都响应式网站建设 网站建设公司 网站制作 成都网站制作 网站制作 成都网站建设流程 网站制作 成都网站建设 网站建设改版