Click here to Skip to main content
15,884,930 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi There,
can we declare a virtual constructor?

if i declare virtual contructor compiler should through error?

should i able to override.

Regards,
Ranjith
Posted

1 solution

No, you cannot declare a virtual constructor (see, for instance, here: "Why do we not have a virtual constructor in C++?" at Stack Overflow[^]).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900