Skip to content

Instantly share code, notes, and snippets.

@afeinberg
Created December 12, 2009 07:49
Show Gist options
  • Save afeinberg/254792 to your computer and use it in GitHub Desktop.
Save afeinberg/254792 to your computer and use it in GitHub Desktop.
#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