Possible duplicate:
Can someone provide me a Singleton sample in C ++?
C ++ Singleton design pattern
C ++ various single versions
I need a Singleton example in a C ++ class because I have never written such a class. For example, in java, I can declare d a static field that is private, and it is initialized in the constructor and the getInstance method, which is also static and returns an instance of the initialization field.
Thanks in advance.
c ++ singleton
Jordan Borisov
source share