GeekInterview.com
Series: Subject:
Question: 250 of 271

Can we have "Virtual Constructors"?

Asked by: Interview Candidate | Asked on: Aug 30th, 2005
Showing Answers 1 - 3 of 3 Answers
Ruth Samuel

Answered On : 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.

  
Login to rate this answer.
nileshkorpe

Answered On : Jun 7th, 2006

No constructor cannot be virtualNilesh Korpe

  
Login to rate this answer.
kalyanji

Answered On : Sep 14th, 2006

    Hi

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

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

  
Login to rate this answer.

Give your answer:

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

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.