다음을 통해 공유


CArray::ElementAt

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

TYPE& ElementAt(
   INT_PTR nIndex 
);
const TYPE& ElementAt( 
   INT_PTR nIndex
) const;

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 an array element.

Remarks

It is used to implement the left-side assignment operator for arrays.

Example

See the example for GetSize.

Requirements

Header: afxtempl.h

See Also

Reference

CArray Class

Hierarchy Chart

CArray::operator []

Other Resources

CArray Members