Freigeben über


CTypedPtrList::GetTail

Gets the pointer that represents the head element of this list.

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

Parameters

  • TYPE
    Template parameter specifying the type of elements stored in the list.

Return Value

If the list is accessed through a pointer to a const CTypedPtrList, then GetTail returns a pointer of the type specified by the template parameter TYPE. This allows the function to be used only on the right side of an assignment statement and thus protects the list from modification.

If the list is accessed directly or through a pointer to a CTypedPtrList, then GetTail returns a reference to a pointer of the type specified by the template parameter TYPE. This allows the function to be used on either side of an assignment statement and thus allows the list entries to be modified.

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.

Requirements

Header: afxtempl.h

See Also

Reference

CTypedPtrList Class

Hierarchy Chart

CObList::IsEmpty

CObList::Find

CObList::GetTailPosition

CObList::GetHeadPosition

CTypedPtrList::GetPrev

CTypedPtrList::GetNext

CTypedPtrList::GetHead

Other Resources

CTypedPtrList Members