home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / CH07 / A07122.TXT < prev    next >
Encoding:
Text File  |  1993-11-23  |  575 b   |  10 lines

  1. Here, two objects of the Fraction class are created in dynamic
  2. memory.  The Fraction object pointed to by the pointer "pf" has
  3. the default initial value of 0/1.  The Fraction at "pg" is
  4. initialized to 1/2.  The class definition must include a default
  5. constructor, or a constructor with arguments matching all
  6. initializers used with the new operator.  An initializer list
  7. supplied in the allocation statement is used as the argument list
  8. of the constructor.  An array of class objects can be created with
  9. the new operator only if the class has a default constructor.
  10.