Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×

Comment Re:Oh god so what? (Score 1) 193

Good luck with your typedefs:

template<typename Range>
double mean(const Range& range)
{
  double sum = 0.0; int count = 0;
  for(auto& v : range) {
    sum += v;
    ++count;
  }
  return sum/count;
}

Slashdot Top Deals

Happiness is twin floppies.

Working...