#include #include using namespace std; main() { map golfer; map ::iterator git; int score; string name, s; while (cin >> score >> name) { getline(cin, s); golfer[name+s] = score; // Here's the associative array line. } for (git = golfer.begin(); git != golfer.end(); git++) { printf("%-30s %5d\n", git->first.c_str(), git->second); } }