* Victor Bazarov:
Alf P. Steinbach wrote: * pl**********@gmail.com: [..]
Can anybody explain me about private and static constructors in c++
A private constructor is private, only accessible to that class.
There is no such thing as static constructor in C++.
Potentially what the OP meant was the "factory method". A static
member that makes an object and returns a pointer (reference) to it.
Private c-tor goes hand in hand with that.
Yes, I think you're right. However, let's point out that "static
constructor" is a relatively standard term in software engineering,
because it does exist in a number of languages. But not in C++.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?