共用方式為


CAtlList::RemoveHead

呼叫這個方法會移除這個項目在清單的開頭。

E RemoveHead( );

傳回值

傳回這個項目在清單的開頭。

備註

標頭項目從清單中刪除,然後,記憶體中釋放。 這個項目的複本會傳回。 如果清單是空的,在偵錯組建中,判斷提示失敗時會發生。

範例

// Define the integer list
CAtlList<int> myList;

// Populate the list
myList.AddTail(100);
myList.AddTail(200);
myList.AddTail(300);

// Confirm the head of the list
ATLASSERT(myList.GetHead() == 100);

// Remove the head of the list
ATLASSERT(myList.RemoveHead() == 100);

// Confirm the new head of the list
ATLASSERT(myList.GetHead() == 200);   

需求

Header: atlcoll.h

請參閱

參考

CAtlList 類別

CAtlList::RemoveHeadNoReturn