/ Vijos /

用户

个人简介

//P1024.cpp

#include

#include

using namespace std;

int Ms=0;

class Hp{

private:

int n,u;

int *x;

public:

Hp():n(Ms){

u=0;

x=new int[n+1];

};

~Hp(){

delete [] x;

};

Hp& Plus(Hp& b);

Hp& operator-=(Hp& b);

Hp& operator=(Hp& b);

Hp& operator=(string& str);

};

Hp& Hp::Plus(Hp& b){

for(int i=1;i=10){

x++;

x[i]-=10;

}

}

while(u0)u++;

else break;

}

return *this;

}

Hp& Hp::operator-=(Hp& b){

for(int i=1;i