CArray::Add
intAdd(ARG_TYPEnewElement);
throw(CMemoryException);
Return Value
The index of the added element.
Parameters
ARG_TYPE
Template parameter specifying the type of arguments referencing elements in this array.
newElement
The element to be added to this array.
Remarks
Adds a new element to the end of an array, growing the array by 1. If SetSize has been used with an nGrowBy value greater than 1, then extra memory may be allocated. However, the upper bound will increase by only 1.
Example
// example for CArray::Add
CArray<CPoint,CPoint> ptArray;
CPoint pt(10,20);
ptArray.Add(pt); // Element 0
ptArray.Add(CPoint(30,40)); // Element 1
CArray Overview | Class Members | Hierarchy Chart
See Also CArray::SetAt, CArray::SetAtGrow, CArray::InsertAt, CArray::operator []