CAtlList::SetAt
Wywołanie tej metody, aby ustawić wartość elementu w danym położeniu na liście.
void SetAt(
POSITION pos,
INARGTYPE element
);
Parametry
pos
Wartość pozycji odpowiadającej element do zmiany.element
Nowe wartości elementu.
Uwagi
Zastępuje istniejącą wartość z element.W kompilacjach debugowania Błąd potwierdzenia może wystąpić w przypadku pos jest równa NULL.
Przykład
// Define the integer list
CAtlList<int> myList;
// Populate the list
myList.AddTail(100);
myList.AddTail(200);
// Use SetAt to change the values stored in the head and
// tail of the list
myList.SetAt(myList.GetHeadPosition(), myList.GetHead() * 10);
myList.SetAt(myList.GetTailPosition(), myList.GetTail() * 10);
// Confirm the values
ATLASSERT(myList.GetHead() == 1000);
ATLASSERT(myList.GetTail() == 2000);
Wymagania
Nagłówek: atlcoll.h