CAtlList::RemoveHead
Wywołanie tej metody, aby usunąć element, na czele listy.
E RemoveHead( );
Wartość zwracana
Zwraca element na czele listy.
Uwagi
Głowy element zostanie usunięty z listy, a pamięć jest zwolniona.Zwracana jest kopia elementu.W kompilacjach debugowania Błąd potwierdzenia wystąpi, jeśli lista jest pusta.
Przykład
// 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);
Wymagania
Nagłówek: atlcoll.h