> cat map.cc #include <string.h> #include <iostream> #include <map> #include <utility> using namespace std; int main() { map<int, string> Employees; // 1) Assignment using array index notation Employees[5234] = "Mike C."; Employees[3374] = "Charlie M."; Employees[1923] = "David D."; Employees[7582] = "John A."; Employees[5328] = "Peter Q."; cout << "Employees[3374]=" << Employees[3374] << endl << endl; cout << "Map size: " << Employees.size() << endl; for( map<int,string>::iterator ii=Employees.begin(); ii!=Employees.end(); ++ii) { cout << (*ii).first << ": " << (*ii).second << endl; } } > g++ -g -o map map.cc > fhpd map [0.0] Loaded executable file: /home/hunt/test/map (fhpd) b main breakpoint 0 deferred (fhpd) run running with this commmand: /home/hunt/test/map Attached to process 3873 Running process 3873 (fhpd) Breakpoint 0 main 0x400e90 (fhpd) list [0.0] (fhpd) n Task stopped at line 10 in file /home/hunt/test/map.cc (fhpd) list [0.0] (fhpd)