BOOL Lookup( const char* key, CObject*& rValue ) const;
key
The string key that identifies the element to be looked up.
rValue
The returned value from the looked-up element.
Lookup uses a hashing algorithm to quickly find the map element with a key that matches exactly (CString value).
TRUE if the element was found; otherwise FALSE.
CMapStringToOb map;
CAge* pa;
map.SetAt( "Bart", new CAge( 13 ) );
map.SetAt( "Lisa", new CAge( 11 ) );
map.SetAt( "Homer", new CAge( 36 ) );
map.SetAt( "Marge", new CAge( 35 ) );
ASSERT( map.Lookup( "Lisa", pa ) ); // Is "Lisa" in the map?
ASSERT( *pa == CAge( 11 ) ); // Is she 11?
CMapStringToOb::operator []