CAtlList::Find
목록에 지정 된 요소를 검색 하려면이 메서드를 호출 합니다.
POSITION Find(
INARGTYPE element,
POSITION posStartAfter = NULL
) const throw( );
매개 변수
element
목록에서 찾을 요소입니다.posStartAfter
검색 시작 위치입니다. 값을 지정 하지 않으면 head 요소에 검색을 시작 합니다.
반환 값
요소의 위치 값 반환 발견, 그렇지 않으면 NULL을 반환 합니다.
설명
디버그 빌드에서 어설션 오류가 목록 개체가 유효 하지 경우 발생할 수 있는 posStartAfter 값이 범위를 벗어났습니다.
예제
// Define the integer list
CAtlList<int> myList;
// Populate the list
myList.AddTail(100);
myList.AddTail(200);
myList.AddTail(300);
myList.AddTail(400);
// Find the '300' element in the list,
// starting from the list head.
POSITION myPos = myList.Find(300);
// Confirm that the element was found
ATLASSERT(myList.GetAt(myPos) == 300);
요구 사항
헤더: atlcoll.h