共用方式為


CArray::Copy

void Copy( const CArray& src );

Parameters

src

Source of the elements to be copied to an array.

Remarks

Use this member function to copy the elements of one array to another.

Call this member function to overwrite the elements of one array with the elements of another array.

Copy does not free memory; however, if necessary, Copy may allocate extra memory to accommodate the elements copied 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) );

// Copy the elements from the second array to the first.
myArray1.Copy( myArray2 );

CArray OverviewClass MembersHierarchy Chart

See Also   CArray::Append