次の方法で共有


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);   

必要条件

**ヘッダー:**atlcoll.h

参照

参照

CAtlList クラス

CAtlList::RemoveHeadNoReturn

その他の技術情報

CAtlList のメンバー