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 / 708.jpg < prev    next >
Joint Photographic Experts Group Image  |  2013-12-12  |  711KB  |  2550x3300
Labels: book | crt screen | reckoner | sky
OCR: 708 Chapter Discovering C++ hand operator. If the operator Is unary there will be one parameter which will be the single argument. The operator is binary operator. The parameter list states that an will ostream be the will right-hand be the left- operand -hand It should operand be and noted that that we Fract are ion writing object this function to work with ostreams other than cout More about this will be discussed in section 12.6 In this example the return type of is a reference to an os tream That allows the operator to act the same with FrA iction object as it does with operands of fundamental type. In particular, the statement cout fract or str ing' grouped as follows cout fraction string' This implies that after the operation cout on 1S com- pleted the result must be something that w ...