Frage zu CArray
-
Servus,
ich hät ne frage zu dem CArray, wie benutze mann des am besten.
Mich verwirrt der zweite Template-ParameterSo ist CArray aufgebaut:
template< class TYPE, class ARG_TYPE > class CArray : public CObject
Das steht in der MSDN:
TYPE
Template parameter specifying the type of objects stored in the array. TYPE is a parameter that is returned by CArray.
ARG_TYPE
Template parameter specifying the argument type used to access objects stored in the array. Often a reference to TYPE. ARG_TYPE is a parameter that is passed to CArray.
Also wie würde dess dann ausschauen wenn ich eine Referénz oder einen Zeiger speichern will.
Schonmal danke für Antworten
-
CArray<int,int&> array1; CArray<Data*,Data*> array2;
-
Aha, gut Danke.