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

What is abstraction c++?

676


What is a memory leak c++?

668


Write a program to add three numbers in C++ utilizing classes.

721


Explain friend class?

737


Can a program run without main in c++?

686






What is c++ & why it is used?

683


write asingle linked list which read from two list & the do the following 1 sort the prime & nonprime num (prime should be less tn nonprime) 2 each node has a prime num followd by nonprime 3 add a new node into its sutable plce 4 erase the most three duplicated non prime num 5 find the least duplicated prime num

2297


What is the use of volatile variable?

687


Write a program to interchange 2 variables without using the third one.

675


What is function prototyping?

706


Explain operator overloading.

687


What is the syntax for a for loop?

693


What is an adaptor class in c++?

696


Is swift a good first language?

675


What gives the current position of the put pointer?

641