Condividi tramite


CMapStringToOb::GetCount

Determines how many elements are in the map.

INT_PTR GetCount( ) const;

Return Value

The number of elements in this map.

Remarks

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

Class

Member Function

CMapPtrToPtr

INT_PTR GetCount( ) const;

CMapPtrToWord

INT_PTR GetCount( ) const;

CMapStringToPtr

INT_PTR GetCount( ) const;

CMapStringToString

INT_PTR GetCount( ) const;

CMapWordToOb

INT_PTR GetCount( ) const;

CMapWordToPtr

INT_PTR GetCount( ) const;

Example

See CObList::CObList for a listing of the CAge class used in all collection examples.

CMapStringToOb map;

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

Requirements

Header: afxcoll.h

See Also

Reference

CMapStringToOb Class

Hierarchy Chart

CMapStringToOb::IsEmpty

Other Resources

CMapStringToOb Members