initial commit
This commit is contained in:
parent
b84bc5bff0
commit
6b6dddcaaa
2 changed files with 24 additions and 1 deletions
10
src/core/sale.cpp
Normal file
10
src/core/sale.cpp
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue