Retrieving a value from the dictionary

Retrieving a value from a disk dictionary has different internal steps than those of adding a value. As you can see in Figure 28, the sequence of events is different from those in Figure 28 which shows how items are added to sets and dictionaries.

The following actions occur when you retrieve a value from a dictionary:


This example retrieves a value from the disk dictionary and puts it into a variable of type TCollectibleLong. Then the value of the key and the dictionary value are printed.

      TCollectibleLong *val = (TCollectibleLong *)dict3->Retrieve (key);
      qprintf("The value retrieved for key \"%d\" = %d\n", key.GetValue(), val->GetValue());

[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker