Export (0) Print
Expand All

CList::GetTail

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

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

TYPE

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.
myList.AddTail(CString(_T("ABC")));

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

Header: afxtempl.h

Show:
© 2014 Microsoft