Closed Tomatin closed 2 years ago
I really like this implementation, but I don't know how to solve this:
struct Tax { std::string name; int amount_1; int amount_2; int amount_3; }; std::vector<Tax> taxes = { {"tax 1", 1, 1}, {"tax 2", 1, 1}, {"tax 1", 2, 2}, {"tax 3", 3, 3}, {"tax 1", 4, 4}, };
The result that I expect would be a vector with these values, where for each tax.name the corresponding amounts are added
Dump result vector
"tax 1", 7, 7 "tax 2", 1, 1 "tax 3", 3, 3
Thanks in advance !
Hi @Tomatin! Here I provided an example: https://github.com/k06a/boolinq/pull/51/files Hope you can use C++14 to be able to use lambda with auto parameter type.
auto
I really like this implementation, but I don't know how to solve this:
The result that I expect would be a vector with these values, where for each tax.name the corresponding amounts are added
Dump result vector
Thanks in advance !