CObList::GetAt

Syntax

CObject*& GetAt( POSITION position );

CObject* GetAt( POSITION position ) const;

Parameters

position

A POSITION value returned by a previous BeginIterate or Find member function call.

Remarks

A variable of type POSITION is a kind of “key” for the list. It is not the same as an index, and you cannot operate on a POSITION value yourself. GetAt retrieves the CObject pointer associated with a given position.

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

Return Value

See the return value description for GetHead.

Example

See the example for FindIndex

See Also

CObList::Find, CObList::SetAt, CObList::GetNext, CObList::GetPrev, CObList::GetHead