但是我们却可以通过静态成员函数的形参来间接调用某个对象的非静态成员变量;
#include <iostream>
using namespace std;
class   MyClass
{
public:
MyClass(){ this->non_static_member=10;}
static void  display(MyClass obj);
static  int  static_member;
int          non_static_member;
};
int MyClass::static_member=5;
void MyClass::display(MyClass obj)
{
cout<<obj.static_member<<endl;
cout<<obj.non_static_member<<endl;
}
int main()
{
MyClass a;
MyClass::display(a);
system("pause");
}