Tags:
#include #include #include #include #include #include
#include #include #include #include
using namespace std; using namespace boost::lambda;
int main() { typedef map map_type; map_type m; m[“a”] = 1; m[“b”] = 2;
typedef map_type::value_type map_pair; for_each(m.begin(), m.end(), cout << bind(&map_pair::first, _1) << ":" << bind(&map_pair::second, _1) << "\n"); return EXIT_SUCCESS; } [/code]
Your email address will not be published. Required fields are marked *
Comment *
Name
Email
Website
Save my name, email, and website in this browser for the next time I comment.
Δ
Leave a Reply