Wednesday, August 1, 2012

Can we have a Virtual Constructor?

A constructor assigns value to variables at compile time and the virtual table is created on the fly.
So it is impossible to a have a virtual constructor since the time a constructor is invoked the vtable won't be available in memory;

No comments :