CObList::GetAt

型別 位置 的變數是清單中的索引鍵。

CObject*& GetAt(
   POSITION position 
);
const CObject*& GetAt( 
   POSITION position  
) const;

參數

  • position
    位置 值由先前 GetHeadPosition尋找 成員函式呼叫會傳回。

傳回值

提供 GetHead參閱傳回值描述。

備註

此資料型別不同,做為索引,因此您不能在 位置 值。GetAt 擷取 CObject 指標與特定位置。

您必須確定您的 位置 值代表清單中的有效位置。如果其無效,則 MFC 程式庫的偵錯版本的判斷提示。

下表顯示類似 CObList::GetAt的其他成員函式。

類別

成員函式

CPtrList

const void*_& GetAt( POSITION 位置 ) const;

void*_& GetAt( POSITION 位置);

CStringList

const CString_& GetAt( POSITION 位置 ) const;

CString_& GetAt( POSITION 位置);

範例

FindIndex。請參閱範例。

需求

Header: afxcoll.h

請參閱

參考

CObList 類別

階層架構圖

CObList::Find

CObList::SetAt

CObList::GetNext

CObList::GetPrev

CObList::GetHead