Skip to content

Instantly share code, notes, and snippets.

@afeinberg
Created December 12, 2009 07:50
Show Gist options
  • Save afeinberg/254793 to your computer and use it in GitHub Desktop.
Save afeinberg/254793 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> animals;
animals["cow"] = "moo";
animals["dog"] = "arf";
for (map<string,string>::iterator it = animals.begin();
it != animals.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