Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int get_sum(const std::vector<MyObject>& my_vect) {
- int sum=0;
- for(const auto& my_obj : my_vect) {
- sum += my_obj.value();
- }
- return sum;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement