다음을 통해 공유


CList::RemoveTail

끝 목록에서 요소를 제거 하 고 포인터를 반환 합니다.

TYPE RemoveTail( );

매개 변수

  • 형식
    템플릿 매개 변수 목록에서 요소의 형식을 지정 합니다.

반환 값

목록의 끝에 있던 요소입니다.

설명

목록에 전화 하기 전에 비어 있어야 RemoveTail. 목록이 비어 있으면 다음 Mfc 라이브러리의 디버그 버전을 어설션 합니다. 사용 IsEmpty 목록에 요소가 포함 되어 있는지 확인 합니다.

예제

// Define myList.
CList<CString,CString&> myList;

// Add two elements to the list.
myList.AddTail(CString(_T("ABC")));
myList.AddTail(CString(_T("123")));

// Remove the tail element and verify the list. 
// NOTE: once the tail is removed, the number of 
// elements in the list will be one.
CString strTail = myList.RemoveTail();
ASSERT((CString(_T("123")) == strTail) && (myList.GetCount() == 1) && 
   (CString(_T("ABC")) == myList.GetTail()));      

요구 사항

헤더: afxtempl.h

참고 항목

참조

CList 클래스

계층 구조 차트

CList::GetTail

CList::AddTail