CArray::SetAtGrow

void SetAtGrow(int nIndex, ARG_TYPE newElement);
  throw(CMemoryException);

参数:
nIndex整数索引。它大于或等于0。
ARG_TYPE指定数组元素类型的模板参数。
newElement被添加在此数组的元素值。允许空值。

说明:
在指定的索引上设置数组元素。如果必要,数组自动增长(调整上界以接纳新元素)。

示例:
//example for CArray::SetAtGrow
CArray ptArray;
ptArray.Add(CPoint(10,20)); //Element 0
ptArray.Add(CPoint(30,40)); //Element 1
                           //Element 2 deliberately skipped
ptArray.SetAtGrow(3,CPoint(50,60)); //Element 3

请参阅:
CArray::GetAt, CArray::SetAt, CArray::ElementAt, CArray::operator []