Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets the CObject pointer that represents the tail element of this list.
TYPE& GetTail( );
const TYPE& GetTail() const;
Parameters
- TYPE
Template parameter specifying the type of elements in the list.
Return Value
See the return value description for GetHead.
Remarks
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.
Example
// 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());
Requirements
Header: afxtempl.h