CList::RemoveHead
Head liste öğesini kaldırır ve kendisine bir işaretçi döndürür.
TYPE RemoveHead( );
Parametreler
- TÜRÜ
Listedeki öğelerin türünü belirleyen şablon parametresi.
Dönüş Değeri
Daha önce at the head liste öğesi.
Notlar
Liste aramadan önce boş olmadığından emin olun gerekir RemoveHead.Liste boşsa, Microsoft Foundation Class Library hata ayıklama sürümünü İleri sürüyor.Use IsEmpty liste öğeleri içerdiğini doğrulayın.
Örnek
// Define myList.
CList<CString,CString&> myList;
// Add two elements to the list.
myList.AddHead(CString(_T("ABC")));
myList.AddHead(CString(_T("123")));
// Remove the head element and verify the list.
// NOTE: once the head is removed, the number of
// elements in the list will be one.
CString strHead = myList.RemoveHead();
ASSERT((CString(_T("123")) == strHead) && (myList.GetCount() == 1) &&
(CString(_T("ABC")) == myList.GetHead()));
Gereksinimler
Başlık: afxtempl.h