Same as for any other container: std::cout << std::accumulate(d.begin(), d.end(), 0.0) / d.size();
For extra flair, you could run it through boost accumulators (although it's only beneficial when you're accumulating multiple statistics a single pass):