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 / 710.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-12  |  664KB  |  2550x3300
Labels: book | crt screen | poster | reckoner | sky
OCR: 710 Chapter Discovering C++ Fract ion Fract on: ope rator Fract ion const Note 2 Fract ion aw dwn num num *f denom denom f num tmp denom denom denom tmp denom tmp num tmp .num, tmp denom dura- denom return tmp, ostream& operator ostream& str, Fracti ion Note 3 num denom, return str; tions This The file code contains for the four constructor functions: a should be constructor clear. It and sets the the three data overloaded members to opera- the default the operations, parameters will not care value unless be has of the negative 0/1. been parameter In taken this for to the function insure denomi that and inator the the 15 code 0; denominator for then it both sets of of any the the values Fraction member object Note 1:The over loaded unary minus is implemented here Note that the tokens Fract ...