Can we have "Virtual Constructors"?

Answer Posted / shashank agrawal

No, This is not possible because virtual is used for avoid
overriding and the constructor is called when the object of
that class has been created so in this case overriding is
not possible then to make the constructor as virtual is
useless.so we dont create it virtal.

Is This Answer Correct ?    13 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is constructor and destructor in c++?

620


What is abstraction in c++?

684


Can we use clrscr in c++?

536


Ask to write virtual base class code?

2152


Mention the ways in which parameterized can be invoked.

540






What is the difference between multiple and multilevel inheritance in c++?

606


Const char *p , char const *p What is the difference between the above two?

665


Name the operators that cannot be overloaded in C++?

587


What is c strings syntax?

610


Why was c++ made?

654


Is linux written in c or c++?

559


What c++ library is string in?

581


Explain rethrowing exceptions with an example?

611


When is the destructor called?

608


How to declaring variables in c++?

663