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.
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
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.