# include <iostream>
using namespace std;
//////// Example of static member function /////////
class StaticFunction
{
public:
static void show() // static member function
{
cout<<"Welcome to static member function"<<endl;
}
};
int main()
{
StaticFunction::show(); // call a static member function
system("pause");
}
using namespace std;
//////// Example of static member function /////////
class StaticFunction
{
public:
static void show() // static member function
{
cout<<"Welcome to static member function"<<endl;
}
};
int main()
{
StaticFunction::show(); // call a static member function
system("pause");
}
No comments:
Post a Comment