Sign up as a WebOS Developer. Get TP for $149# PDA - 掌中宝
a*y
1 楼
怎么实现?
{for (int i=c.begin();i<=c.end();i++)
fn;}
对吗?觉得有些不对!
implement the Reduce function using templates.
The Reduce fn applies a function of two arguments cumulatively
to the items of an STL container, from begin() to end(), so as
to reduce the sequence to a single value. For example,
Reduce(
{for (int i=c.begin();i<=c.end();i++)
fn;}
对吗?觉得有些不对!
implement the Reduce function using templates.
The Reduce fn applies a function of two arguments cumulatively
to the items of an STL container, from begin() to end(), so as
to reduce the sequence to a single value. For example,
Reduce(
- , std::plus
should calculate ((((1+2)+3)+4)+5).
class NotEnoughElements {};
template