C + + Class object construction, the first application of a piece of memory, and then call the constructor to initialize;
We know that if there is a virtual function, there will be a virtual function table vtable, and the virtual function is when the expression is generated, of course, after the call to the constructor function;
So the problem is, if the constructor is a virtual function, at this time the memory is a blank, there is no such virtual function table vtable, then cannot find the constructor;
Therefore, the constructor cannot be a virtual function.
For destructors, a virtual function is possible because the virtual function table is already established, and often destructors are virtual functions. The reason is that, when destroying an object through a base-class pointer, you can correctly identify the type of object to be destroyed, thus preventing the destructor from appearing completely.
The constructor of a C + + class cannot be a reason for a virtual function