How to construct virtual constructor
Answer Posted / shakti singh khinchi
Virtual constructors are not used in any case in c++, bcz
the construction order in c++ should always remains from
base to derived , no one can changed their construction
order, so no need to declare constructor as virtual. But if
anyone wants to make it virtual then it is possible to make
a constructor virtual but it is against the OOPs.
| Is This Answer Correct ? | 12 Yes | 2 No |
Post New Answer View All Answers
Is empty stack c++?
How can you link a c program with a c function?
Explain the concept of copy constructor?
What sorting algorithm does c++ use?
Do you know the use of vtable?
What is a static member?
What is flush c++?
What is the difference between a "copy constructor" and an "assignment operator" in C++?
Why c++ is not a pure oop language?
What is the default access level?
what is the difference between overloading & overriding? give example.
What is a buffer c++?
Can we define a constructor as virtual in c++?
What is a linked list in c++?
List different attributes in C++?