cppannotations/annotations/yo/containers/mapexample.yo

8 lines
392 B
Text

As mentioned at the beginning of section ref(MAP), the tt(map) represents
a sorted associative array. In a tt(map) the keys are sorted. If an
application must visit all elements in a map the tt(begin) and tt(end)
iterators must be used.
The following example illustrates how to make a simple table listing all keys
and values found in a map:
verbinclude(-a examples/maptable.cc)