CAtlList::RemoveHead

Chamar esse método para remover o elemento no início da lista.

E RemoveHead( );

Valor de retorno

Retorna o elemento no início da lista.

Comentários

O elemento principal é excluído da lista, e a memória é liberada.Uma cópia do elemento é retornada.Em compilações de depuração, uma falha de declaração ocorrerá se a lista estiver vazia.

Exemplo

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

Requisitos

Cabeçalho: atlcoll.h

Consulte também

Referência

Classe de CAtlList

CAtlList::RemoveHeadNoReturn