diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/csmap_erase.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/csmap_erase.c b/examples/csmap_erase.c index 1c533a99..cbcc2607 100644 --- a/examples/csmap_erase.c +++ b/examples/csmap_erase.c @@ -49,6 +49,11 @@ int main() printmap(m2); mymap_iter it1 = mymap_advance(mymap_begin(&m2), 1); mymap_iter it2 = mymap_find(&m2, mymap_back(&m2)->first); + + puts("to remove:"); + c_foreach (i, mymap, it1, it2) + printf(" [%d, %s]", i.ref->first, cstr_str(&i.ref->second)); + puts(""); // The 2nd member function removes elements // in the range [First, Last) mymap_erase_range(&m2, it1, it2); |
