CAtlList::AddTail
Wywołanie tej metody, aby dodać element do ogona tej listy.
POSITION AddTail( );
POSITION AddTail(
INARGTYPE element
);
Parametry
- element
Aby dodać element.
Wartość zwracana
Zwraca pozycję nowo dodany element.
Uwagi
Jeśli pierwsza wersja pusty element jest tworzony za pomocą jego domyślny konstruktor zamiast jego kopii konstruktora.Element zostanie dodany na końcu listy, a więc teraz staje się ogon.Tej metody można z pustą listę.
Przykład
// Define the list
CAtlList<int> myList;
// Add elements to the tail
myList.AddTail(1);
myList.AddTail(2);
myList.AddTail(3);
// Confirm the current head of the list
ATLASSERT(myList.GetHead() == 1);
// Confirm the current tail of the list
ATLASSERT(myList.GetTail() == 3);
Wymagania
Nagłówek: atlcoll.h