Share via


CMap::RemoveAll

Removes all the values from this map by calling the global helper function DestructElements.

void RemoveAll( );

Remarks

The function works correctly if the map is already empty.

Example

CMap<int,int,CPoint,CPoint> myMap;

// Add 10 elements to the map.
for (int i=0;i < 10;i++)
   myMap.SetAt(i, CPoint(i, i));

myMap.RemoveAll();

ASSERT(myMap.IsEmpty());      

Requirements

Header: afxtempl.h

See Also

Reference

CMap Class

Hierarchy Chart

CMap::RemoveKey

Other Resources

CMap Members