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

Can a constructor return a value?

573


which of the following is not an secondary constant a) array b) real c) union

1252


What are the unique features of C++.

567


What is c++ iterator?

635


Comment on local and global scope of a variable.

573






What is the difference between function overloading and operator overloading?

567


declare an array of structure where the members of the structure are integer variable float variable integer array char variable access all elements of the structure using dot operator and this pointer operator

1739


Does improper inheritance have a potential to wreck a project?

624


Mention the storage classes in c++.

640


What is the difference between structures and unions?

580


What is a buffer c++?

579


What are structs in c++?

596


Do class declarations end with a semicolon?

596


What is abstraction in c++?

674


What are enumerations?

651