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

  1. Here, the copy constructor for the Fraction class creates the
  2. object "y", and assigns the value of each data member of the
  3. Fraction object "x" to the respective data member in the Fraction
  4. "y".  You can write a copy constructor to perform any activities
  5. associated with duplicating an object.  For example, making a copy
  6. might involve file I/O or allocating more dynamic memory.
  7.