// Code derived from Stroustrup's PPP2 book// § 9.3 Interface and implementation// -and beginning on p 307classX{public:// interface (the user’s view of the class)intf(inti){m=i;returnmf();}private:// implementation details (the implementer’s view of the class)intm;intmf(){returnm;}};// for something that’s just data,// A struct is a class where members are public by defaultstructY{intm;// . . .};intmain(){Xx;// int y = x.mf(); // error: mf is private (i.e., inaccessible)inty=x.f(2);returny;}