Anonymous user
Associative array/Iteration: Difference between revisions
→{{header|C++}}
Line 88:
}</lang>
An alternative version using <code>for_each</code> and lambda functions
<lang cpp>#include <map>
#include <algorithm>
Line 108:
cout << "key = " << p.first << ", value = " << p.second << endl;
});
return 0;
}</lang>
|