3

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

is it possible?

3 Answers 3

17

Sure:

class A { public: static void f(); }; ... A::f(); // call function 
Sign up to request clarification or add additional context in comments.

Comments

1

No problem at all, thats the point of them.

Comments

1

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.