#include #include int main() { int arr[] = { 1, 2, 3, 4, 5 }; std::for_each(arr, ar+5), [](int x) { std::cout << x << ' '; }); }