So here is the problem i want to create a class that would be something like this :
and there would be only one instance which you would acsses via :: operator. So there is only one of this class in whole project.Code:class something { private: static int i; public: static void operate() { // do something } }
Is there a better way to declare a class than write static in front of everything?
what does
mean?Code:static class { ... }something;
I could make the constructor private, but i still need to create an instance of class...
I just want to create a class that stands for it's own, and that you can't make others, is this possible ?