14.2) Example: Statistical Analysis Program In A Single File
The program consists of four separate functions, as shown below. (Function contents are not relevant and are therefore elided.)
void read_data(ifstream& input, vector<double>& data) { ... } double mean(const vector<double>& data) { ... } double stdev(const vector<double>& data) { ... } int main(int argc, char* argv[]) { ... }