Partager via


CTypedPtrMap::operator

This operator can be used only on the left side of an assignment statement (an l-value).

VALUE& operator [ ]( 
   BASE_CLASS::BASE_ARG_KEY key  
);

Parameters

  • VALUE
    Template parameter specifying the type of values stored in this map.

  • BASE_CLASS
    Template parameter specifying the base class of this map's class.

  • key
    The key of the element to be looked up or created in the map.

Remarks

If there is no map element with the specified key, then a new element is created. There is no "right side" (r-value) equivalent to this operator because there is a possibility that a key may not be found in the map. Use the Lookup member function for element retrieval.

Requirements

Header: afxtempl.h

See Also

Reference

CTypedPtrMap Class

Hierarchy Chart

CTypedPtrMap::Lookup