CAtlList::RemoveTail

Wywołanie tej metody, aby usunąć element na końcu listy.

E RemoveTail( );

Wartość zwracana

Zwraca element przy bełcie listy.

Uwagi

Element ogon jest usuwany 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 tail of the list
ATLASSERT(myList.GetTail() == 300);

// Remove the tail of the list
ATLASSERT(myList.RemoveTail() == 300);

// Confirm the new tail of the list
ATLASSERT(myList.GetTail() == 200);   

Wymagania

Nagłówek: atlcoll.h

Zobacz też

Informacje

Klasa CAtlList

CAtlList::RemoveTailNoReturn

CAtlList::RemoveHead

CAtlList::RemoveHeadNoReturn