First page Back Continue Last page Graphics
THREE PARAMETER TYPES
In the median function, we used a parameter of type vector<double> to copy the vector into the function. This allowed the function to manipulate the copy without changing the original calling program data.
In the grade function, we used a parameter of type const vector<double>& to define a reference. The & says don't copy and the const promises the function won't change the original data. (read only)