01.02

#include 

using namespace std;
int blood=10000;
class hero
{
protected:
    string name;
    int hp;
    int attck;
public:
    hero(){cout<<"hero的无参构造函数"<0)
    {
        p1.Atk();
        if(blood>0)
        {
         p2.Atk();
        }
        count++;
       cout<<"怪物的血量还剩:"<

01.02_第1张图片 

你可能感兴趣的:(c++)