home *** CD-ROM | disk | FTP | other *** search
/ C by Discovery (4th Edition) / C_By_Discovery_4th_Edition.tar / C_By_Discovery_4th_Edition / CH_12 / 709.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-12  |  513KB  |  2550x3300
Labels: book | poster | reckoner
OCR: 12.4 C++ and OOP Polymorphism 709 of class The next Fracti file .on operations contains the on the implementation of member functions review then Before and some discussing operators basic and implementation of the operator the arithmetic the Fracti ion class, we should c/a fraction arithmetic. If fraction a/b and fraction and (ad bc) /bd Example 12-13: fraction.cpp fracti ion adp Contains an impl lementati ion of the funct Lon members of the Fract ion class Incl lude #incl ude <iostream h> #inci ude 11 fract ion h Fracti uo Fract ion int int nu denom num denom num denom Fracti ion Fract ion: :operator const // Note 1 Fracti ion tmp( -num denom tmp denom tmp num tmp num tmp denom denom, return denon durt