algorithm to add values of two ranges and place them into a third one

前端 未结 4 2050
说谎
说谎 2021-01-18 05:03

I was just wondering if there was anything (either in c++11 or boost) that could help me do something like this:

std::vector v1 = {1, 2, 3};
std::         


        
4条回答
  •  难免孤独
    2021-01-18 05:40

    std::transform (http://en.cppreference.com/w/cpp/algorithm/transform) is what you might be looking for.

提交回复
热议问题