CObArray::SetSize

Call this member function to establish the size of an empty or existing array; allocating memory if necessary. If the new size is smaller than the old size, then the array is truncated and all unused memory is released. For efficiency, call SetSize to set the size of the array before using it. This prevents the need to reallocate and copy the array each time an item is added.

Syntax

void SetSize( int nNewSize, int nGrowBy = –1 );
throw( CMemoryException );

At a Glance

Header file: Afxcoll.h
Platforms:
Versions: 1.0 and later
Complete documentation: Visual C++ documentation

See Also

CObArray Overview, CObArray Member Functions, Array Classes