I created a class
with static
members but I faced a compiling error which is "a storage class can only be specified for objects and functions.".
What's the solution?
#include<iostream>
using namespace std;
static class Hi {
public: static string ShowMessage(string Message)
{
return Message;
}
};
int main()
{
cout << Hi::ShowMessage("Hello");
return 0;
}