Static Methods for Libraries

Is it possible to have static methods in libraries or classes? Similar to what java does. For example, in java you can call the math class: Math.pow(3,2);

Is it possible to have static methods in libraries or classes? Similar to what java does. For example, in java you can call the math class: Math.pow(3,2);

Yes. You can create a static method in a class, and call that method from the sketch, or from other methods in the class. Calling a static method in a class is done using the scope resolution operator (::) not the member operator (.).

Thanks. What is the syntax?

What is the syntax?

For what? For declaring a static function in a class? For calling the static function from the class? For calling the static function from the sketch?

how about all of the above?

how about all of the above?

OK.

For declaring a static function in a class?

class stupidStuff
{
   stupidStuff();
   static void someFunction(); // Takes no arguments
}
For calling the static function from the class?
stupidStuff::stupidStuff()
{
   stupidStuff::someFunction();
}

For calling the static function from the sketch?

#include "stupidStuff.h"

   stupidStuff::someFunction();

Thank you PaulS =)