How to construct virtual constructor

Answer Posted / richa

Constructors can't be virtual in C++.It is an error.The
destructors on the other hand can be virtual.

Is This Answer Correct ?    29 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the four partitions in which c++ compiler divides the ram?

686


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create

2055


What is istream and ostream in c++?

576


When should we use multiple inheritance?

600


Define virtual constructor.

628






If we want that any wildcard characters in the command line arguments should be appropriately expanded, are we required to make any special provision? If yes, which?

988


If I is an integer variable, which is faster ++i or i++?

578


What is extern c++?

511


Does std endl flush?

599


Describe protected access specifiers?

665


How can an improvement in the quality of software be done by try/catch/throw?

572


What happens when the extern "c" char func (char*,waste) executes?

623


How to declare a pointer to an array of integers?

631


Differentiate between structure and class in c++.

583


Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?

598