initial commit

This commit is contained in:
Martin Brodbeck 2018-07-12 13:34:17 +02:00
parent b84bc5bff0
commit 6b6dddcaaa
2 changed files with 24 additions and 1 deletions

10
src/core/sale.cpp Normal file
View file

@ -0,0 +1,10 @@
#include "sale.h"
#include <numeric>
int Sale::sumInCents()
{
int test = std::accumulate(articles_.begin(), articles_.end(), 0,
[](int a, Article* b) { return a + b->getPrice(); });
return test;
}