CAN WE HAVE "VIRTUAL CONSTRUCTORS"?

Amit Singh

Total Post:0

Points:0
Posted by  Amit Singh
OOPS 
 2189  View(s)
Ratings:
Rate this:
  1. Amit Singh

    Post:562

    Points:2810
    Can we have "Virtual Constructors"?

    constructor cannot be virtual.

    Reason
    :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.

      Modified On Mar-26-2018 05:58:50 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!