Compartir a través de


CAtlMap::Lookup

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

bool Lookup(
   KINARGTYPE key,
   VOUTARGTYPE value 
) const;
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 which can be used as a position for calls to CAtlMap::GetNext and so on.

Remarks

Lookup uses a hashing algorithm to quickly find the map element containing a key that exactly matches the given key parameter.

Requirements

Header: atlcoll.h

See Also

Reference

CAtlMap Class

Other Resources

CAtlMap Members