#include <iostream>
using namespace std;
class stat
{
private:
static int p;
public:
static int Get() { return p; }
};
int stat::p;
int main()
{
stat s;
cout << s.GetValue() << endl;
}
Static data members can be accessed in the same way by static member functions.
No comments:
Post a Comment
SAY HELLO!!