Defined in:Sets the current size of an array.
void SetArrayElementCount(int32 count);
void SetArrayElementCount(int32 count, const type& init);
||The new size of the array.|
||A reference to an object that is used to copy-construct new objects in the array.|
SetArrayElementCountfunction sets the number of objects currently stored in an array. If
countis greater than the current size of the array, then space is allocated for
countobjects and each new object is copy-constructed from the value of the
countis less than the current size of the array, then the logical size of the array is reduced, and each object beyond the new size of the array is destroyed in reverse order.
initparameter is omitted, then any new objects created are default-constructed if the type of object stored in the array is a non-POD type. If the type of object stored in the array is a POD type, then any new objects created are left uninitialized.