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
What is #include ctype h in c++?
What are static variables?
What is microsoft c++ redistributable?
What is setf in c++?
What is the use of string in c++?
Which is best c++ or java?
What does int * mean in c++?
What is the role of copy constructor in copying of thrown objects?
What is the use of data hiding?
What is class definition in c++ ?
How much do c++ programmers make?
What are smart pointers?
Explain the difference between class and struct in c++?
What are manipulators used for?
What is near, far and huge pointers? How many bytes are occupied by them?