A
Alex Vinokur
Let v be:
vector<pair<string, size_t> > v;
sum = 0;
for (size_t k = 0; k < v.size(); k++)
{
sum += v[k].second;
}
Is it possible to compute sum using std::accumulate (i.e. not using
for-loop)?
Alex Vinokur
email: alex DOT vinokur AT gmail DOT com
http://mathforum.org/library/view/10978.html
http://sourceforge.net/users/alexvn
vector<pair<string, size_t> > v;
sum = 0;
for (size_t k = 0; k < v.size(); k++)
{
sum += v[k].second;
}
Is it possible to compute sum using std::accumulate (i.e. not using
for-loop)?
Alex Vinokur
email: alex DOT vinokur AT gmail DOT com
http://mathforum.org/library/view/10978.html
http://sourceforge.net/users/alexvn