Condividi tramite


CTypedPtrList::SetAt

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

void SetAt( 
   POSITION pos, 
   TYPE newElement  
);

Parameters

  • pos
    The POSITION of the element to be set.

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

  • newElement
    The object pointer to be written to the list.

Remarks

A variable of type POSITION is a key for the list. It is not the same as an index, and you cannot operate on a POSITION value yourself. SetAt writes the object pointer to the specified position in the list.

You must ensure that your POSITION value represents a valid position in the list. If it is invalid, then the Debug version of the Microsoft Foundation Class Library asserts.

For more detailed remarks, see CObList::SetAt.

Requirements

Header: afxtempl.h

See Also

Reference

CTypedPtrArray Class

Hierarchy Chart