- Delta
- 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
Resize
Sets a new (smaller) size of the array.
bool Resize(
|
Parameters
size
[in] New size of the array.
Return Value
true - successful, false - there was an attempt to set the size less than zero.
Note
Changing the size of the array allows using the memory optimally. Excessive elements on the right are lost. To reduce fragmentation of memory, the array size is changed by the step previously determined by the Step(int) method or the default step of 16.
Example:
//--- example for CArrayFloat::Resize(int)
|