CMap::GetNextAssoc

voidGetNextAssoc(POSITION&rNextPosition,KEY&rKey,VALUE&rValue)const;

Parameters

rNextPosition

Specifies a reference to a POSITION value returned by a previous GetNextAssoc or GetStartPosition call.

KEY

Template parameter specifying the type of the map’s key.

rKey

Specifies the returned key of the retrieved element.

VALUE

Template parameter specifying the type of the map’s value.

rValue

Specifies the returned value of the retrieved element.

Remarks

Retrieves the map element at rNextPosition, then updates rNextPosition to refer to the next element in the map. This function is most useful for iterating through all the elements in the map. Note that the position sequence is not necessarily the same as the key value sequence.

If the retrieved element is the last in the map, then the new value of rNextPosition is set to NULL.

Example

See the example for CMap::SetAt.

CMap OverviewClass MembersHierarchy Chart

See Also   CMap::GetStartPosition