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

其他资讯

Copyright © 2007-2024 成都优众联杰科技有限公司 All Rights Reserved 蜀ICP备2024116266号
友情链接: 成都网站设计 高端定制网站设计 成都网站制作 网站设计 四川成都网站制作 成都网站设计 成都定制网站建设 成都定制网站建设 成都网站建设公司 成都网站设计制作公司 成都网站设计 响应式网站设计方案 定制网站制作 成都网站建设 成都网站建设 营销型网站建设 成都营销网站制作 成都网站制作 成都网站制作 成都品牌网站建设 成都网站制作 重庆电商网站建设