Freigeben über


CObList::GetSize

Returns the number of list elements.

INT_PTR GetSize( ) const;

Return Value

The number of items in the list.

Remarks

Call this method to retrieve the number of elements in the list.

The following table shows other member functions that are similar to CObList::GetSize.

Class

Member Function

CPtrList

INT_PTR GetSize( ) const;

CStringList

INT_PTR GetSize( ) const;

Example

See CObList::CObList for a listing of the CAge class.

CObList list;

list.AddHead(new CAge(21));
list.AddHead(new CAge(40)); // List now contains (40, 21).
ASSERT(list.GetSize() == 2);      

Requirements

Header: afxcoll.h

See Also

Concepts

CObList Class

CObList Members

Hierarchy Chart

CObList::GetCount