Reputation: 6774
how do i make only 1 object creation of any class?
Upvotes: 0
Views: 229
Reputation: 3558
Check out the Singleton Pattern: http://sourcemaking.com/design_patterns/singleton
EDIT: Updated link from C# to C++
Upvotes: 1
Reputation: 882591
It's known as the Singleton design pattern. There are many tutorials for it, e.g. one here.
Upvotes: 1