Export (0) Print
Expand All


Gets the CObject pointer that represents the tail element of this list.

TYPE& GetTail( ); 
const TYPE& GetTail() const;


Template parameter specifying the type of elements in the list.

See the return value description for GetHead.

You must ensure that the list is not empty before calling GetTail. If the list is empty, then the Debug version of the Microsoft Foundation Class Library asserts. Use IsEmpty to verify that the list contains elements.

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

// Add an element to the end of the list.

// Verify the element was added to the end of the list.
ASSERT(CString(_T("ABC")) == myList.GetTail());

Header: afxtempl.h

© 2014 Microsoft