Mooophy/Cpp-Primer

10.37 better

Layty opened this issue · 1 comments

Layty commented
    vector<int> v = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
    list<int> l2(v.rend() - 7, v.rend() - 2);
    for_each(l2.cbegin(), l2.cend(), [](const int c) { cout << c << ","; });
Layty commented

It is better if dst is a vector