Interview Questions   Tutorials   Discussions   Programs   Videos   

C++ - Why we have a private constructor ?




253
views
asked marvit August 19, 2014 02:52 AM  

Why we have a private constructor ?


           

1 Answers



 
answered By bhjahnavi   0  
If some constructor is private, it means that no one but the class itself (and friends) should be able to create instances of it using that constructor.
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