Interview Questions   Tutorials   Discussions   Programs   Videos   

C++ - Can we have "Virtual Constructors"?




280
views
asked marvit August 18, 2014 12:59 PM  

Can we have "Virtual Constructors"?


           

1 Answers



 
answered By bhjahnavi   0  
The ‘virtual’ mechanism works on a logically complete  object. We know that we use constructors to logically initialize our objects. In other words, the object is not completely constructed until the constructor has finished executing. Thus, we can’t have virtual constructors.
flag   
   add comment

Your answer

Join with account you already have

FF

Preview


Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!

Alert