You are viewing a single comment's thread. Return to all comments →
I think there is another way , to avoid the static_cast(0) , and do it by simply accumulate(....,0L);
If I remember correct (I am too lazy to search in books or google now to verify!) the L forces the number to be interpreted as long long.
L is the suffix for long just like LL is the suffix for long long. Weird but not confusing. accumulate(....,0LL) avoids the static cast.