// Code derived from Stroustrup's PPP2 book// § 8.5.4 Pass-by-const-reference// -and beginning on p 276#include<iostream>#include<vector>usingnamespacestd;voidprint(vector<double>v)//pass-by-value;appropriate?{cout<<"{ ";for(inti=0;i<(int)v.size();++i){cout<<v[i];if(i!=(int)v.size()-1)cout<<", ";}cout<<" }\n";}voidf(intx){vector<double>vd1(10);// small vectorvector<double>vd2(10000);// large vectorvector<double>vd3(x);// vector of some unknown size// ... fill vd1, vd2, vd3 with values ...print(vd1);print(vd2);print(vd3);}intmain(){f(10);}