3)主程序文件 main.cpp
#include <iostream>
#include <string.h>
#include "game.h"
using namespace std;
int main()
{
CDragon dragon;
CWolf wolf;
while (1) {
for (int i = 0; i < 60000; i++);
dragon.Attack(&wolf);
if (wolf.IsDead())
break;
}
return 0;
}
  4)运行结果