Hi
how I can having sum in loop function,please give me example if you can!!.
I would suggest looking into "std::accumulate()":
http://www.cplusplus.com/reference/numeric/accumulate/
To help you any more then that though we would need to see some of your code.
EDIT: Bah! Ninja'd! I thought about suggesting a range based for loop, but this one won the coin toss.
Last edited on