How to construct virtual constructor

Answer Posted / gaurav

The first thing, Why we need a Virtual constructors, do we
really need that..... :) If I am making an object of A then
I should not expect the object of class B as I can directly
make a B class object.

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write about an iterator class?

592


How to declare a function pointer?

563


What is function overloading c++?

558


To which numbering system can the binary number 1101100100111100 be easily converted to?

590


. If employee B is the boss of A and C is the boss of B and D is the boss of C and E is the boss of D. Then write a program using the Database such that if an employee name is Asked to Display it also display his bosses with his name. For eg. If C is displayed it should also display D and E with C?

2744






What is a virtual destructor? Explain the use of it?

532


What do you mean by inheritance in c++?

583


What is cin clear () in c++?

596


How can you tell what shell you are running on unix system?

623


Can a new be used in place of old mallocq? If yes, why?

622


What is the meaning of c++?

529


Implement stack operations with pointers with appropriate exception checks.

554


In the derived class, which data member of the base class are visible?

624


Which is the best c++ software?

595


Is map sorted c++?

505