What is virtual constructor paradigm?

Answer Posted / priyanka kokil

I want to modify the above answer. A constructor cannot be
virtual because at the time when the constructor is invoked
the virtual table would not be available in the memory.
Hence we cannot have a virtual constructor. But we can have
virtual destructor which is defined in Answer #2

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are guid?

908


When the constructor of a base class calls a virtual function, why doesn't the override function of the derived class gets called?

796


What is rtti in c++?

819


What is the use of object in c++?

790


What is the purpose of ios::basefield in the following statement?

996






How do I use arrays in c++?

750


What is the return value of the insertion operator?

808


Write about the local class and mention its use?

810


Describe the advantage of an external iterator.

779


Explain abstraction.

809


What is the header file for setw?

788


What are the rules about using an underscore in a c++ identifier?

812


Explain how we implement exception handling in c++?

766


Does c++ have foreach?

718


What do you mean by stack unwinding in c++?

926