void fn(map<string, string> &m, map<string, string>::iterator i) { cout << "i->first: " << i->first << endl; if (++i == m.end()) { end(); } else {
void call(function<void ()> f) { f(); } void end() { cout << "End..." << endl; } void fn(map<string, string> &m, map<string, string>::iterator i) { cout << "i->first: " << i->first << endl; if (++i == m.end()) { end(); } else { call(bind(&fn, m, i));
Leave a comment: