Share via


CRBMap::Lookup

Call this method to look up keys or values in the CRBMap object.

bool Lookup(
   KINARGTYPE key,
   VOUTARGTYPE value 
) const throw(...);
const CPair* Lookup(
   KINARGTYPE key 
) const throw( );
CPair* Lookup(
   KINARGTYPE key 
) throw( );

Parameters

  • key
    Specifies the key that identifies the element to be looked up.

  • value
    Variable that receives the looked-up value.

Return Value

The first form of the method returns true if the key is found, otherwise false. The second and third forms return a pointer to a CPair.

Remarks

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

Example

// Look up the value for a key of 0
double v;
myMap.Lookup(0,v);

Requirements

Header: atlcoll.h

See Also

Reference

CRBMap Class

Other Resources

CRBMap Members