谢谢

解决方案 »

  1.   

    use CMap?
    #include <afxwin.h>
    #include <afxtempl.h>
    void main()
    {
    AfxWinInit(::GetModuleHandle(NULL), NULL, ::GetCommandLine(), 0);
    CMap<int, int, CString, CString> m_cMap;
    m_cMap.SetAt(9923033,  "张三");
    m_cMap.SetAt(9826033,  "张A");
    m_cMap.SetAt(9923063,  "张B");
    m_cMap.SetAt(9923093,  "张C");
    CString strName;
    m_cMap.Lookup(9923063, strName);
    AfxMessageBox(strName);
    }
      

  2.   

    CMap <int,int,CString,CString> m_map;
    m_map[0,1]="china";
    m_map{0,2]="china2";
    m_map[1,1]="china3";
    AfxMessageBox(m_map[0,1]);
    ...
      

  3.   

    我想让MAP里的元素也是MAP怎样实现?
      

  4.   

    还是用STL得好
    CMAP<int,int,CMAP,CMAP> m_map  ??????
      

  5.   

    是的
    CMap<int,int,CString,CString> table;
    CMAP<int,int,table,table> m_map
    这样做行吗?