=ce){an.hp--;an.de--;}else{an.hp=an.hp-ce+an.de;an.de--;}if(an.hp<0){an.hp=0;}if(an.de<0){an.de=0;}cout< =ce){an.hp--;an.de--;}else{an.hp=an.hp-ce+an.de;an.de--;}if(an.hp<0){an.hp=0;}if(an.de<0){an.de=0;}cout<
登录
首页 » c++ » 玩家PK

玩家PK

于 2022-08-02 发布 文件大小:304.42 kB
0 136
下载积分: 2 下载次数: 1

代码说明:

#include #include #include #include #include #include using namespace std; class Role { protected: int hp,ce,de,fa; int flag; string nn; public: Role(string n, int h, int c, int d, int f):nn(n),hp(h),ce(c),de(d),fa(f) {} ~Role() {} void combat(Role &an) { if(fa>an.fa) { flag=1; loop2: cout

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • lesson-1
    Windows程序运行原理及程序编写流程,窗口产生过程,句柄原理,消息队列,回调函数,窗口关闭与应用程序退出的工作关系,使用VC++的若干小技巧,stdcall与cdecl调用规范的比较,初学者常犯错误及注意事项。(Run Windows program principles and procedures for the preparation process, the process window, handle theory, message queues, the callback function, the application window is closed and quit working relationship, using VC++ several tips, stdcall and cdecl calling conventions comparison, beginners often mistakes and precautions.)
    2013-12-25 18:17:24下载
    积分:1
  • volume3D
    使用vtk库开发的volume程序,主要用于建立多边形面片,用于演示三维体的算法。(Developed using VTK library volume procedures, set up primarily for polygon surfaces for the presentation of three-dimensional body algorithms.)
    2009-02-18 16:45:24下载
    积分:1
  • 28335_mppt
    4路pwm,buck升压,错相抑制电流脉动(4 pwm, buck boost, current ripple-phase inhibition)
    2011-05-05 10:21:00下载
    积分:1
  • shouxietishuzishibie
    该代码中实现了手写体数字的识别,其中的手写数字识别平台可以直接使用(The code to achieve a handwritten numeral recognition, one of the handwritten numeral recognition platform could be used directly)
    2009-04-19 10:59:57下载
    积分:1
  • 2
    说明:  企业短信群发管理系统,谢谢大家,希望对您有所帮助(Bulk SMS business management system, thank you, I hope for your help)
    2014-12-05 13:41:22下载
    积分:1
  • Cprogram
    该程序是通信中认知无线电的频谱预测模型的相关源代码,对通信方面的同学非常有用,带平台(The program is the communication of cognitive radio spectrum prediction model related to the source code, for communications students very useful, with platform )
    2011-12-15 15:44:56下载
    积分:1
  • UDF_03_Files
    说明:  用C语言编写的Fluent UDF实例,包含Adjust宏,profile宏等八个实例教程,快速上手(The UDF is for computational fluid dynamics software Fluent, it concludes the Profile.c,the Adjust.c)
    2019-05-11 00:02:23下载
    积分:1
  • 18 硬件SPI-595
    stm32 驱动595 使用SPI协议,学习SPI协议的基本用法(STM32 driver 595 uses SPI protocol)
    2020-06-20 18:20:02下载
    积分:1
  • 字符串比较
    说明:  实现字符串比较的功能,是C语言课程老师布置的作业,(To realize the function of string comparison is the assignment of C language course teachers.)
    2020-06-21 17:20:01下载
    积分:1
  • TestiPhoneCal
    说明:  一个非常简单的日历程序,可以作为插件使用(a simple calendar code)
    2011-03-09 17:29:53下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载