home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / CH06 / A06111.WAV (.mp3) < prev    next >
Waveform Audio File Format  |  1993-10-21  |  381.8 KB  |  1 channel  |  11,025 sample rate  |  35 seconds
Transcription: Here, the declaration of the object A converts the floating point value 2.5 into a fraction object with the value 5 over 2. The conversion for B is a two-step process. First, minus 3 is converted from an integer to a floating point using a building conversion. Then the value minus 3.0 is converted to a fraction object minus 3 over 1 using the constructor. The constructor is not an inline function because the conversion function is fairly complicated.