10 lines
No EOL
237 B
C++
10 lines
No EOL
237 B
C++
#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;
|
|
} |