yeah, in addition, the class itself can call this private constructor too, it's useful when you declare a static member of the class itself.

numnum (numnum)
(#120567@0)
2001-7-5 -05:00

回到话题: Can I write constructer as private in c++, if I can who can access it ? (This my interview question, continue)

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论

URL:   
http://www.rolia.net/zh/post.php?f=0&p=120567