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
What is the role of copy constructor in copying of thrown objects?
Do class method definitions?
Explain what is oop?
What do you mean by inheritance in c++? Explain its types.
What is constant in c++ with example?
How do I run a program in notepad ++?
Is c++ still being used?
What does it mean to declare a destructor as static?
What is command line arguments in C++? What are its uses? Where we have to use this?
What are the methods of exporting a function from a dll?
Why is c++ not purely object oriented?
Is swift faster than c++?
What is a syntax in c++?
Write about the access privileges in c++ and also mention about its default access level?
What is the difference between c++ and turbo c++?