home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / CH06 / A06111.TXT < prev    next >
Encoding:
Text File  |  1993-08-18  |  446 b   |  8 lines

  1. Here, the declaration of the object "a" converts the floating
  2. point value 2.5 into a Fraction object with the value 5/2.  The
  3. conversion for "b" is a 2-step process.  First, -3 is converted
  4. from an integer to a floating point, using a built-in conversion.
  5. Then the value -3.0 is converted to a Fraction object, -3/1, using
  6. the constructor.  This constructor is not an inline function
  7. because the conversion function is fairly complicated.
  8.