Share via


CTypedPtrList::AddHead

This member function calls BASE_CLASS**::AddHead**.

POSITION AddHead( 
   TYPE newElement  
); 
void AddHead( 
   CTypedPtrList<BASE_CLASS, 
   TYPE> *pNewList  
);

Parameters

  • TYPE
    Type of the elements stored in the base-class list.

  • newElement
    The object pointer to be added to this list. A NULL value is allowed.

  • BASE_CLASS
    Base class of the typed pointer list class; must be a pointer list class (CObList or CPtrList).

  • pNewList
    A pointer to another CTypedPtrList object. The elements in pNewList will be added to this list.

Return Value

The first version returns the POSITION value of the newly inserted element.

Remarks

The first version adds a new element before the head of the list. The second version adds another list of elements before the head.

Requirements

Header: afxtempl.h

See Also

Reference

CTypedPtrList Class

Hierarchy Chart