TYPE& GetHead( );
TYPE GetHead( ) const;
Return Value
If the list is accessed through a pointer to a const CTypedPtrList, then GetHead 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 GetHead 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.
Parameters
TYPE
Template parameter specifying the type of elements stored in the list.
Remarks
Gets the pointer that represents the head element of this list.
You must ensure that the list is not empty before calling GetHead. 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.
CTypedPtrList Overview | Class Members | Hierarchy Chart
See Also CPtrList::IsEmpty, CTypedPtrList::GetTail, CTypedPtrList::GetNext, CTypedPtrList::GetPrev