Created
December 12, 2009 07:49
-
-
Save afeinberg/254792 to your computer and use it in GitHub Desktop.
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
#include <iostream> | |
#include <map> | |
#include <string> | |
using namespace std; | |
int main(int argc, char **argv) { | |
map<string,string> animal_sounds; | |
animal_sounds["cow"] = "moo"; | |
animal_sounds["dog"] = "arf"; | |
for (map<string,string>::iterator it = animal_sounds.begin(); | |
it != animal_sounds.end(); | |
it++) | |
{ | |
cout << it->first << " says " << it->second << endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment