// Code derived from Stroustrup's PPP2 book// § 9.2 Classes and members// -and beginning on p 305classX{public:intmf(intv)// class function member{intold=m;m=v;returnold;}intm;// class data member};intmain(){Xvar;// var is a local (automatic) variable of type Xvar.m=7;// assign to var's data member mintx=var.mf(9);// call var's member function mf()returnx;}