Map::GetFirstMapElement
Defined in:
Returns the first element in a map.
TSMap.h
Prototype
type *GetFirstMapElement(void) const;
Description
The GetFirstMapElement
function returns a pointer to the first element in a map. If the map is empty, then this function returns nullptr
.The first element in a map is always the one having the least key value based on the ordering defined for the
KeyType
type. The MapElement::GetNextMapElement
function can be repeatedly called to iterate through the members of a map in order.NOTE. The running time for the
First
function is O(log n), where n is the number of objects stored in the map.
See Also