CObArray::ElementAt

Returns a temporary reference to the element pointer within the array.

CObject*& ElementAt(
   INT_PTR nIndex 
);

Параметры

  • nIndex
    An integer index that is greater than or equal to 0 and less than or equal to the value returned by GetUpperBound.

Возвращаемое значение

A reference to a CObject pointer.

Заметки

It is used to implement the left-side assignment operator for arrays. Note that this is an advanced function that should be used only to implement special array operators.

The following table shows other member functions that are similar to CObArray::ElementAt.

Class

Member Function

CByteArray

BYTE& ElementAt( INT_PTR nIndex );

CDWordArray

DWORD& ElementAt( INT_PTR nIndex );

CPtrArray

void*& ElementAt( INT_PTR nIndex );

CStringArray

CString& ElementAt( INT_PTR nIndex );

CUIntArray

UINT& ElementAt( INT_PTR nIndex );

CWordArray

WORD& ElementAt( INT_PTR nIndex );

Пример

See the example for CObArray::GetSize.

Требования

Header: afxcoll.h

См. также

Основные понятия

CObArray Class

CObArray Members

Hierarchy Chart

CObArray::operator [ ]