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


CMapStringToOb::GetSize

Returns the number of map elements.

INT_PTR GetSize( ) const;

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

The number of items in the map.

Заметки

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

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

Class

Member Function

CMapPtrToPtr

INT_PTR GetSize( ) const;

CMapPtrToWord

INT_PTR GetSize( ) const;

CMapStringToPtr

INT_PTR GetSize( ) const;

CMapStringToString

INT_PTR GetSize( ) const;

CMapWordToOb

INT_PTR GetSize( ) const;

CMapWordToPtr

INT_PTR GetSize( ) const;

Пример

CMapStringToOb map;

map.SetAt(_T("Bart"), new CAge(13));
map.SetAt(_T("Homer"), new CAge(36));
ASSERT(map.GetSize() == 2);         

Требования

Header: afxcoll.h

См. также

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

CMapStringToOb Class

CMapStringToOb Members

Hierarchy Chart