Lecture 4 - Slide 8 : 40
Use of constructors

We illustrate the use of overloaded constructors - using funny Point initializations

point.h
Class Point with a variety of constructors.
point.cc
Funny implementations of the constructors.
prog3.cc
Use of constructors - with local variables of class type.
prog3-output
Actual program output.
prog2-more.cc
An additional Point construction attempt - a trap.
prog2-modern.cc
An additional Point construction attempt - with use of uniform default initialization.
Go to exercise
Use of constructors with object on the free store