Compartir a través de


CRBMultiMap::FindFirstWithKey

Call this method to find the position of the first element with a given key.

POSITION FindFirstWithKey( 
   KINARGTYPE key  
) const throw( );

Parameters

  • key
    Specifies the key that identifies the element to be found.

Return Value

Returns the POSITION of the first key/value element if the key is found, NULL otherwise.

Remarks

A key in the CRBMultiMap can have one or more associated values. This method will provide the position value of the first value (which may, in fact, be the only value) associated with that particular key. The position value returned can then be used with CRBMultiMap::GetNextValueWithKey or CRBMultiMap::GetNextWithKey to obtain the value and update the position.

See the documentation for the base class CRBTree for information on the other methods available.

Example

See the example for CRBMultiMap::CRBMultiMap.

Requirements

Header: atlcoll.h

See Also

Reference

CRBMultiMap Class

CRBMultiMap::GetNextValueWithKey

CRBMultiMap::GetNextWithKey