#include using namespace std; class Apple { public: // static member function static void printMsg() { cout << "Welcome to Apple!"; } }; // main function int main() { // invoking a static member function Apple::printMsg(); }