-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".

I understand the theory, but my key is a String e.g “RFIDTAG1”.And my value is an unsigned integer. Example.UNIT is the Value to the Specific KEY ...for example {Age : 27} Where Age is the Key and 27 is the Value.I struggle when the value is an integer, I can understand if the value was a structure.So Can you use {Age: 27 } as the example and show me the code like below when using a structure

  • This question doesn't make any sense. The terrible formatting isn't helping. You've found the [edit] link already; try consulting the [formatting help](http://stackoverflow.com/editing-help), too. – Cody Gray - on strike Jun 25 '16 at 13:25

1 Answers1

0

The & means pass by reference.

See this link.

Also here on MSDN.

ARG_VALUE

Data type used for VALUE arguments; usually a reference to VALUE.

Community
  • 1
  • 1
Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
  • I understand the theory, but my key is a String e.g “RFIDTAG1” And my value is an unsigned integer. Example.UNIT is the Value to the Specific KEY ...for example {Age : 27} Where Age is the Key and 27 is the Value I struggle when the value is an integer, I can understand if the value was a structure. – David Panicker Jun 25 '16 at 13:12