Created
July 5, 2018 00:27
-
-
Save nmarley/c28de321bd15d1205900b1cf9d595d2e to your computer and use it in GitHub Desktop.
C++ -- output of modifying map in range-based for
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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