CList::AddTail
이 목록 끝에 새 요소 또는 요소 목록에 추가합니다.
POSITION AddTail(
ARG_TYPE newElement
);
void AddTail(
CList* pNewList
);
매개 변수
ARG_TYPE
템플릿 매개 변수 (참조 될 수 있습니다) 목록 요소의 형식을 지정 합니다.newElement
이 목록에 추가할 요소입니다.pNewList
다른 포인터 CList 목록.요소에서 pNewList 이 목록에 추가 됩니다.
반환 값
반환 된 첫 번째 버전은 위치 새로 삽입된 한 요소의 값입니다.
설명
목록 작업 전에 비워 둘 수 있습니다.
예제
// Define myList and myList2.
CList<CString,CString&> myList;
CList<CString,CString&> myList2;
// Add elements to the end of myList and myList2.
myList.AddTail(CString(_T("A")));
myList.AddTail(CString(_T("B")));
myList2.AddTail(CString(_T("C")));
myList2.AddTail(CString(_T("D")));
// There are two versions of CList::AddTail: one adds a single
// element to the end of the list, the second adds another list
// to the end.
// This adds the string "ABC" to the end of myList.
// myList is a list of CStrings (ie defined as CList<CString,CString&>).
myList.AddTail(CString(_T("ABC")));
ASSERT(CString(_T("ABC")) == myList.GetTail());
// This adds the elements of myList2 to the end of myList.
myList.AddTail(&myList2);
요구 사항
헤더: afxtempl.h