Skip to content

Instantly share code, notes, and snippets.

@nmarley
Created Jul 5, 2018
Embed
What would you like to do?
C++ -- output of modifying map in range-based for
$ git log -1 --oneline
f255aad (HEAD -> master, origin/master) add separator to break up output
$ g++ -std=c++11 range-for-modify.cpp
$ ./a.out
added = 1
added = 0
key = [2], value = [two]
key = [5], value = [five]
key = [7], value = [seven]
key = [13], value = [thirteen]
key = [21], value = [twenty-one]
=================================
key = [2], value = [two]
key = [5], value = [five]
key = [7], value = [seven]
key = [13], value = [thirteen]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment