摘要:
#include <iostream> using namespace std; int division(int a, int b) //传入2个int型变量若被除数或者除数为0 则抛出异常否则返回结果 { if (a == 0) { cout << "抛出异常" << endl; throw 1 阅读全文
摘要:
class weapon { public: virtual void weapon_init() = 0; //初始化武器 virtual bool sucking() = 0;//是否吸血 virtual bool Crit() = 0;//是否暴击 virtual int damage() = 阅读全文