摘要: 一个关于涨薪审批的范例 #include <iostream> #ifdef _DEBUG //只在Debug(调试)模式下 #ifndef DEBUG_NEW #define DEBUG_NEW new(_NORMAL_BLOCK,__FILE__,__LINE__) //重新定义new运算符 # 阅读全文
posted @ 2024-06-11 12:31 白伟碧一些小心得 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 一个具体范例的逐步重构 Fighter.h #ifndef __RIGHTER__ #define __RIGHTER__ ////增加补充生命值道具(药品) //enum ItemAddlife //{ // LF_BXD, //补血丹 // LF_DHD, //大还丹 // LF_SHD, // 阅读全文
posted @ 2024-06-11 12:00 白伟碧一些小心得 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 一个基本的状态转换范例 monster.h #ifndef _MONSTER__ #define _MONSTER__ class MonsterStatus; //类前向声明 //怪物类 class Monster { public: Monster(int life); ~Monster(); 阅读全文
posted @ 2024-06-11 11:29 白伟碧一些小心得 阅读(2) 评论(0) 推荐(0) 编辑