#include <iostream>
using namespace std;
class MyClass
{
private:
static int x;
static int calc(int a, int b)
{
cout << "chekcing !! ";
return b * a;
}
};
int MyClass::x = 1;
int main()
{
MyClass::calc(1,2);
MyClass::x += 3;
return 0 ;
}
问题:据我所知静态成员不是类的一部分,那么为什么我们要检查访问说明符?