Skip to content

Latest commit

 

History

History
3 lines (2 loc) · 295 Bytes

File metadata and controls

3 lines (2 loc) · 295 Bytes

accumulate的第三个参数类型决定了函数中使用哪个加法运算符以及返回值的类型

这里0为int类型,所以使用的是int类型的加法运算符并返回int类型,而vector中元素为double类型,转换为int类型所有小数位都将被舍弃,会损失精度