This documentation is archived and is not being maintained.

CArray::Append

Call this member function to add the contents of one array to the end of another.

INT_PTR Append(
   const CArray& src 
);

Parameters

src
Source of the elements to be appended to an array.

Return Value

The index of the first appended element.

Remarks

The arrays must be of the same type.

If necessary, Append may allocate extra memory to accommodate the elements appended to the array.

Example

CArray<CPoint,CPoint> myArray1, myArray2;

// Add elements to the second array.
myArray2.Add( CPoint(11, 22) );
myArray2.Add( CPoint(12, 42) );

// Add elements to the first array and also append the second array.
myArray1.Add( CPoint(1, 2) );
myArray1.Append( myArray2 );

See Also

CArray Overview | Class Members | Hierarchy Chart | CArray::Copy

Show: