Can we have "Virtual Constructors"?

Showing Answers 1 - 3 of 3 Answers

Ruth Samuel

  • Aug 30th, 2005

A virtual call is a mechanism to get work done given partial information. In particular, "virtual" allows us to call a function knowing only an interfaces and not the exact type of the object. To create an object you need complete information. In particular, you need to know the exact type of what you want to create. Consequently, a "call to a constructor" cannot be virtual.

  Was this answer useful?  Yes


  • Sep 14th, 2006


            In My opinion there is no such concept In C++

           But some  says Can anyone tell mehow is it possible??? 

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Answer Question

Click here to Login / Register your free account

Send   Reset


Related Answered Questions