CList::FindIndex
값을 사용 하 여 nIndex 의 인덱스 목록입니다.
POSITION FindIndex(
INT_PTR nIndex
) const;
매개 변수
- nIndex
인덱스 목록 요소를 찾을 수 있습니다.
반환 값
A 위치 반복 또는 개체 포인터 검색;을 사용할 수 있는 값 NULL 경우 nIndex 음수 이거나 너무 큽니다.
설명
헤드에서 중지 목록을 순차적 검색 시작 된 nth 요소.
예제
// Define myList.
CList<CString,CString&> myList;
// Add three elements to the list.
myList.AddTail(CString(_T("XYZ")));
myList.AddTail(CString(_T("ABC")));
myList.AddTail(CString(_T("123")));
// Verify the first element (index 0).
ASSERT(CString(_T("XYZ")) == myList.GetAt(myList.FindIndex(0)));
// Verify the third element (index 2).
ASSERT(CString(_T("123")) == myList.GetAt(myList.FindIndex(2)));
요구 사항
헤더: afxtempl.h