Why is it so that we can have virtual constructors but we
cannot have virtual destructors?
Answers were Sorted based on User's Feedback
Answer / sachinmundhra
vptr gets initialize in constructor. So in that case we
cannot have virtual constructor.
| Is This Answer Correct ? | 5 Yes | 0 No |
Precompilation ?
Program to open a file with First argument
What do you mean by inheritance?
In c++ there is only virtual destructors, no constructors. Why?
What is oop in simple words?
When is it necessary to use member-wise initialization list in C++?
Write a program to get the binary tree.
When is a memory allocated to a class?
char* ptr = "Rahul"; *ptr++; printf("%s",ptr); What will be the output
why we call c++ is object oriented lanaguage
What is the Advantage of Interface over the Inheritance in OOPS?
write a program that takes input in digits and display the result in words from 1 to 1000