Zapelejete komentara.
 
void DestroyList(CObList& rList)
{
    for (POSITION Pos = rList.GetHeadPosition() ; Pos != NULL ; )
    {
        CObject *pObj = (CObject *) rList.GetNext(Pos);
 
        // Delete object
        //
        // Note: This *will* call the destructor of the derived
        // class. This was verified empirically.
        //
 
        delete pObj;
    }
 
    rList.RemoveAll();
}

Одговори путем е-поште