I want to combine these three features together
- std::for_each
- std::array
- lambda function
into one example using C++11.
std::for_each(arr, arr + sizeof(arr) / sizeof(int), [&](int x) { std::cout<<x<<" ";});
How to convert that code to operate over std::array ?
Aucun commentaire:
Enregistrer un commentaire