Thursday 11 January, 2007

Why can't we have "Virtual Constructors"?

Virtual mechanism acts on 'complete objects'.
An object is complete 'after' the constructor has finished executing.
So, it is illegal to make constructors virtual.
Destructors can be virtual because by the time you apply them object has been constructed completely.

No comments: