This documentation is archived and is not being maintained.

CRBMap::SetAt 

Call this method to insert an element pair into the map.


POSITION SetAt(
   KINARGTYPE key,
   VINARGTYPE value 
) throw(...);

Parameters

key

The key value to add to the CRBMap object.

value

The value to add to the CRBMap object.

Returns the position of the key/value element pair in the CRBMap object.

SetAt replaces an existing element if a matching key is found. If the key is not found, a new key/value pair is created.

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

// Add an element to the map, with a key of 0
myMap.SetAt(0,1.1);
Show: