Partilhar via


CAtlList::RemoveTail

telefonar Este método para remover o elemento que está na cauda da lista.

E RemoveTail( );

Valor de retorno

Retorna o elemento na cauda da lista.

Comentários

O elemento de cauda é excluído da lista e memória seja liberada.Uma cópia do elemento é retornada.Em compilações de depurar, um erro de declaração ocorrerá se a lista está vazia.

Exemplo

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

Requisitos

Cabeçalho: atlcoll.h

Consulte também

Referência

Classe CAtlList

CAtlList::RemoveTailNoReturn

CAtlList::RemoveHead

CAtlList::RemoveHeadNoReturn

Outros recursos

CAtlList membros