-1
What I do not understand is the : 「UINT&」. What does it mean in the context of the template
static CMap<CString, LPCSTR, UINT, UINT&> cXMLfields::fields_by_name;
static CMap<CString, LPCSTR, UINT, UINT&> cXMLfields::oopf_fields_by_name;
static CString friendly_name[XML_FIELDNUM];
static CString fields_by_id[XML_FIELDNUM];
static CString oopf_fields_by_id[OOPF_XML_FIELDNUM];
static void Build_map();
static void MoveItem(CListBox& src, CListBox& dst, int index);
CMap<CString,LPCTSTR, struct_sample,struct_sample> myMap;
struct_sample aTest;
aTest.a = 1;
aTest.b = 2;
aTest.c = 3;
myMap.SetAt("test",aTest);
struct_sample aLookupTest;
BOOL bExists = myMap.Lookup("test",aLookupTest); //Retrieves the
//struct_sample corresponding to "test".
我理解的理論,但我的關鍵是一個字符串例如「RFIDTAG1」。而我的值是一個無符號整數。例如.UNIT是特定關鍵字的值...例如{Age:27}其中Age是關鍵字,而27是Value.I當值是一個整數時掙扎,我可以理解該值是否是一個結構。所以你可以使用{Age:27}作爲例子,並使用結構向我展示如下代碼:MFC類CMAP
這個問題沒有任何意義。可怕的格式不起作用。你已經找到[edit]鏈接了;請嘗試諮詢[格式幫助](http://stackoverflow.com/editing-help)。 –