Compartilhar via


CMapStringToOb::GetSize

Returns the number of map elements.

INT_PTR GetSize( ) const;

Return Value

The number of items in the map.

Remarks

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;

Example

CMapStringToOb map;

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

Requirements

Header: afxcoll.h

See Also

Reference

CMapStringToOb Class

Hierarchy Chart