CObArray::ElementAt
Returns a temporary reference to the element pointer within the array.
CObject*& ElementAt(
INT_PTR nIndex
);
Parameters
- nIndex
An integer index that is greater than or equal to 0 and less than or equal to the value returned by GetUpperBound.
Return Value
A reference to a CObject pointer.
Remarks
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 |
---|---|
BYTE& ElementAt( INT_PTR nIndex ); |
|
DWORD& ElementAt( INT_PTR nIndex ); |
|
void*& ElementAt( INT_PTR nIndex ); |
|
CString& ElementAt( INT_PTR nIndex ); |
|
UINT& ElementAt( INT_PTR nIndex ); |
|
WORD& ElementAt( INT_PTR nIndex ); |
Example
See the example for CObArray::GetSize.
Requirements
Header: afxcoll.h