class A
{
public:
A(){a = 3;}
void ok(){cout << "ok" << endl;}
static void okokok(){}
int a;
static int b;
};
int A::b = 8;
{
public:
A(){a = 3;}
void ok(){cout << "ok" << endl;}
static void okokok(){}
int a;
static int b;
};
int A::b = 8;
int A:: *p = 0;
int *ps = 0;
void (A:: *pf)() = 0;
void (*pff)() = 0;
int main()
{
A x;
x.ok();
pf = &A::ok;
(x.*pf)();
p = &A::a;
cout << x.a << endl;
cout << x.*p << endl;
(x.*p) = 8;
cout << x.a << endl;
ps = &A::b;
pff = A::okokok;
A::b = 10;
cout << A::b << endl;
*ps = 100;
cout << A::b << endl;
*ps = 2 * (*ps);
cout << *ps << "==" << A::b << endl;
return 0;
}