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 |
---|---|
INT_PTR GetSize( ) const; |
|
INT_PTR GetSize( ) const; |
|
INT_PTR GetSize( ) const; |
|
INT_PTR GetSize( ) const; |
|
INT_PTR GetSize( ) const; |
|
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