- Reserve
- Resize
- Shutdown
- Add
- AddArray
- AddArray
- Insert
- InsertArray
- InsertArray
- AssignArray
- AssignArray
- Update
- Shift
- Delete
- DeleteRange
- At
- CompareArray
- CompareArray
- InsertSort
- Search
- SearchGreat
- SearchLess
- SearchGreatOrEqual
- SearchLessOrEqual
- SearchFirst
- SearchLast
- SearchLinear
- Save
- Load
- Type
Reserve
Allocates memory to increase the size of the array.
bool Reserve(
|
Parameters
size
[in] The number of additional elements of the array.
Return Value
true - successful, false - there was an attempt to request for an amount less than or equal to zero, or failed to increase the array.
Note
To reduce fragmentation of memory, the array size is changed using the step previously determined by the Step(int) method or the default step of 16.
Example:
//--- example for CArrayShort::Reserve(int)
|