// Code derived from Stroustrup's PPP2 book// § 8.5.7 Argument checking and conversion// -and beginning on p 284#include<iostream>usingnamespacestd;typedefdoubleT;voidf(Tx);// declaration of f()voidf(doublex);// re-declaration of f() (types match, OK)voidf(double){}// definition of f()intmain(){Ty=3.1415;f(y);Tx=y;// initialize x with y (see §8.2.2)cout<<x<<'\n';}voidg(inty){f(y);doublex=y;// initialize x with y (see §8.2.2)cout<<x<<'\n';}//---voidff(intx);// declvoidff(int){}// defnvoidgg(doubley){ff(y);// how would you know if this makes sense?intx=y;// how would you know if this makes sense?cout<<x<<'\n';}// If you really mean to truncate a double value to an int, say so explicitlyvoidggg(doublex){intx1=x;// truncates x//intx2=int(x);intx3=static_cast<int>(x);// very explicit conversion (§17.8)ff(x1);ff(x2);ff(x3);ff(x);// truncates x//ff(int(x));ff(static_cast<int>(x));// very explicit conversion (§17.8)}