2.2.7.1.4 Array::GetSize

Description

Provides access to the size of the array

Syntax

int GetSize( )

Parameters

Return

Returns the size of the array

Examples

EX1

#include <Array.h>
struct PERSON
{
	int nID;
};
void Array_GetSize_ex1()
{
	Array<PERSON&> ai(true);
	for ( int ii = 0; ii < 3; ii++ )
	{
		PERSON* pp = new PERSON;
		pp->nID = 100 + ii;
		ai.Add(*pp);
	}
	for ( ii = 0; ii < ai.GetSize(); ii++ )
	{
		printf("Item %d's value is : %d\n", ii + 1, ai.GetAt(ii).nID);
	}
}

Remark

See Also

Header to Include

Array.h