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 are the advantages of using a pointer? Define the operators that can be used with a pointer.
Which is better c++ or java?
What is a modifier in c++?
Can you be bale to identify between straight- through and cross- over cable wiring? And in what case do you use straight- through and cross-over?
Can I uninstall microsoft c++ redistributable?
What is a base class?
Which is not an ANSII C++ function a) sin() b) tmpnam() c) kbhit()
What is the difference between a template and a macro?
Write a program in c++ to print the numbers from n to n2 except 5 and its multiples
Explain the differences between list x; & list x();.
How can I disable the "echo" feature?
What language is a dll written in?
What are smart pointers?
What is the use of volatile variable?
How do you decide which integer type to use?