home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / CH10 / A10193.WAV (.mp3) < prev    next >
Waveform Audio File Format  |  1993-10-22  |  348.4 KB  |  1 channel  |  11,025 sample rate  |  32 seconds
Transcription: Four constructors are defined for the fraction class. The first is a user-defined default constructor. It creates a fraction with the initial value of zero over one. The second constructor has two integer arguments. The second argument is optional. It can convert an integer to a fraction or construct a fraction from a specified numerator and denominator. The third constructor converts a floating point value to a fraction. The fourth constructor makes a copy of another fraction object.