0
点赞
收藏
分享

微信扫一扫

CtypedPtrMap 例子

其生 2022-03-19 阅读 40

 

#include <afxtempl.h>

typedef CTypedPtrMap <CMapStringToPtr, CString, int*> CRecords;

   

CRecords m_Records;
    CString str = "abc";
    int *pRecord = new int(47);
    m_Records.SetAt(str, pRecord);
    POSITION pos = m_Records.GetStartPosition();
    while (pos!=NULL) {
        m_Records.GetNextAssoc(pos, str, pRecord);
        CString strtemp;
        strtemp .Format("%s %d",str, *pRecord);        
        AfxMessageBox(strtemp);
        delete pRecord;
    }
    m_Records.RemoveAll();

举报

相关推荐

Dockerfile(例子)

Flutter 例子

NIO例子

nginx 配置例子

cxf简单例子

0 条评论