Поделиться через


CObList::GetSize

Returns the number of list elements.

INT_PTR GetSize( ) const;

Возвращаемое значение

The number of items in the list.

Заметки

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;

Пример

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);      

Требования

Header: afxcoll.h

См. также

Основные понятия

CObList Class

CObList Members

Hierarchy Chart

CObList::GetCount