Compartilhar via


CArray::RemoveAll

Removes all the elements from this array.

void RemoveAll( );

Remarks

If the array is already empty, the function still works.

Example

CArray<CPoint,CPoint> myArray;

// Add elements to the array. 
for (int i = 0; i < 10; i++)
   myArray.Add(CPoint(i, 2*i));

myArray.RemoveAll();

#ifdef _DEBUG
   afxDump.SetDepth(1);
   afxDump << "myArray: " << &myArray << "\n";
#endif      

Requirements

Header: afxtempl.h

See Also

Reference

CArray Class

Hierarchy Chart