// Here's a small C++ class that demonstrates how // to write a static method for a class. #include using namespace std; class myClass { public: static void sayHello() { cout << "Hello world!\n"; getchar(); } }; int main() { myClass::sayHello(); return 0; }