#include<iostream>
using namespace std;
class T
{
public:
T(int x){a=x,b+=x;}
static void display(T c)
{cout<<c.a<<","<<c.b<<endl;}
private:
int a;
static int b;//声明
};
int T::b=5;//定义
int main()
{
T A(3);
T::display(A);
T B(5);
T::display(B);
}
int main()
{
T A(3),T B(5);
T::display(A);
T::display(B);
}