home *** CD-ROM | disk | FTP | other *** search
- Here, two objects of the Fraction class are created in dynamic
- memory. The Fraction object pointed to by the pointer "pf" has
- the default initial value of 0/1. The Fraction at "pg" is
- initialized to 1/2. The class definition must include a default
- constructor, or a constructor with arguments matching all
- initializers used with the new operator. An initializer list
- supplied in the allocation statement is used as the argument list
- of the constructor. An array of class objects can be created with
- the new operator only if the class has a default constructor.
-