tags:

views:

162

answers:

3

i have a class with static functions. i need to use the functions without creating an instance of the class.

is it possible?

+12  A: 

Sure:

class A {
   public:
      static void f();
};

...

A::f();    // call function
anon
+1  A: 

No problem at all, thats the point of them.

Viktor Sehr
+1  A: 

Or you can use the singleton design pattern: http://en.wikipedia.org/wiki/Singleton_pattern#C.2B.2B

ChRapO