CObList::GetAt
A variable of type POSITION is a key for the list.
CObject*& GetAt(
POSITION position
);
const CObject*& GetAt(
POSITION position
) const;
Параметры
- position
A POSITION value returned by a previous GetHeadPosition or Find member function call.
Возвращаемое значение
See the return value description for GetHead.
Заметки
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 Microsoft Foundation Class Library asserts.
The following table shows other member functions that are similar to CObList::GetAt.
Class |
Member Function |
---|---|
const void*& GetAt( POSITION position ) const; void*& GetAt( POSITION position ); |
|
const CString& GetAt( POSITION position ) const; CString& GetAt( POSITION position ); |
Пример
See the example for FindIndex.
Требования
Header: afxcoll.h