CArray::SetAt

void SetAt( int nIndex, ARG_TYPE newElement );

Parameters

nIndex

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

ARG_TYPE

Template parameter specifying the type of arguments used for referencing array elements.

newElement

The new element value to be stored at the specified position.

Remarks

Sets the array element at the specified index. SetAt will not cause the array to grow. Use SetAtGrow if you want the array to grow automatically.

You must ensure that your index value represents a valid position in the array. If it is out of bounds, then the Debug version of the library asserts.

Example

See the example for GetAt.

CArray OverviewClass MembersHierarchy Chart

See Also   CArray::GetAt, CArray::SetAtGrow, CArray::ElementAt, CArray::operator []