Thanks mate
khoam .
However, there is a small problem, because the function seems to not sum the last element:
Example print:
Quote: 1658734976,205,208,235,234,-3,330,331,329,332,331,332,333,330,331,332,331,331,332,331,331,333
Total voltages: 4967
.
Counting from the seventh decimal (v01 330) to the last 333 should be 5300.
[edit.]
I already know why:
"Input iterators to the initial and final positions in a sequence. The range used is [first,last), which contains all the elements between first and last, including the element pointed by first
but not the element pointed by last. "