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".
이론은 이해하지만 키는 String 인 "RFIDTAG1"입니다. 내 값은 부호없는 정수입니다. Example.UNIT는 특정 키에 대한 값입니다. 예를 들면 다음과 같습니다. {Age : 27} Age가 키이고 27이 Value입니다. 값이 정수인 경우 투쟁하며 값이 구조체인지 이해할 수 있습니다. 그래서 예를 들어 {Age : 27}을 사용하고 구조체를 사용할 때 아래와 같은 코드를 보여 주시겠습니까?MFC 클래스 CMAP
이 질문은 이해가되지 않습니다. 끔찍한 형식은 도움이되지 않습니다. 이미 [편집] 링크를 찾았습니다. [서식 도움말] (http://stackoverflow.com/editing-help)을 참고하십시오. –