Condividi tramite


CSimpleArray::operator =

Assignment operator.

CSimpleArray< T, TEqual > 
& operator =( 
   const CSimpleArray< T, TEqual >& src  
);

Parameters

  • src
    The array to copy.

Return Value

Returns a pointer to the updated CSimpleArray object.

Remarks

Copies all elements from the CSimpleArray object referenced by src into the current array object, replacing all existing data.

Example

// Create an array of chars and copy it to a second array
CSimpleArray<char> cMyArray1;
cMyArray1.Add('a');
CSimpleArray<char> cMyArray2;
cMyArray2 = cMyArray1;
ATLASSERT(cMyArray2[0] == 'a');   

Requirements

Header: atlsimpcoll.h

See Also

Reference

CSimpleArray Class