#include #include #include #include "Tracer.h" using namespace std; void PrintOut(const pair &p) { cout << "printout [" << p.first << "," << p.second << "]" << endl; } int main(int argc, char **argv) { Tracer a, b, c, d, e, f; map table; map::iterator it; table.insert(pair(a, b)); table[c] = d; table[e] = f; cout << "table[e]:" << table[e] << endl; it = table.find(c); cout << "PrintOut(*it), where it = table.find(c)" << endl; PrintOut(*it); cout << "iterating:" << endl; for_each(table.begin(), table.end(), &PrintOut); return 0; }