// www.ug.it.usyd.edu.au/~elau8465/map.cc #include #include #include using namespace std; struct Employee { string name; Employee(const string& s) : name(s) { } }; int main() { map id; id[0] = Employee("John Smith"); id[1] = Employee("Mary Jane"); cout << id[0].name << endl; map id2; Employee a("A"), b("B"); id2[a] = 100; id2[b] = 200; return 0; }