摘要: class weapon { public: virtual void weapon_init() = 0; //初始化武器 virtual bool sucking() = 0;//是否吸血 virtual bool Crit() = 0;//是否暴击 virtual int damage() = 阅读全文
posted @ 2020-04-22 20:00 神迹丶 阅读(371) 评论(0) 推荐(0) 编辑
摘要: //头文件 #ifndef STRING_H #define STRING_H class String { public: String(); String(const char* buf); //带参构造 String(const String& other); //深拷贝 int len()c 阅读全文
posted @ 2020-04-21 01:31 神迹丶 阅读(376) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> #include<windows.h>//所需头文件 //#include"cpptest.h" using namespace std; void read_subitem() {//子健获取 HKEY cpp_key; LPCTSTR cpp_data = 阅读全文
posted @ 2020-04-15 01:22 神迹丶 阅读(1121) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> using namespace std; //二分查找法,查找一个数组的元素,并返回所在的位置的下标, //必须要是一个有序的数组, int select_arr(int arr[], int len, int arr_value) { while (1) { 阅读全文
posted @ 2020-04-13 23:49 神迹丶 阅读(3196) 评论(0) 推荐(0) 编辑
摘要: //dll头文件 #ifndef MYDLL_H #define MYDLL_H #ifndef MYDLL_EXPORT #define MYDLL _declspec(dllexport) #else #define MYDLL _declspec(dllimport) #endif //dll 阅读全文
posted @ 2020-04-12 20:12 神迹丶 阅读(3128) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; #include<string> //按位取得年份,年份用第一个字节的前7位存储,则将该字节向右移动一位即可获得 int GetYear(const unsigned char buffer) { int mask = 阅读全文
posted @ 2020-04-12 15:17 神迹丶 阅读(485) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; #include<string> //判断1个字节某个位是0或者是1 传入一个字节和要查询的位 bool decide(unsigned char& status,int num) { // 左移操作, 并让传入的变量 阅读全文
posted @ 2020-04-12 13:18 神迹丶 阅读(703) 评论(0) 推荐(0) 编辑
摘要: #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <string> using namespace std; template<typename T> T sum(T other1, T other2) { T reslut = 阅读全文
posted @ 2020-04-11 20:20 神迹丶 阅读(160) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; #include<vector> //定义一个类,用于存放数据 class Test { int a; public: Test(int x) :a(x){} void print_id() { cout << a < 阅读全文
posted @ 2020-04-11 20:10 神迹丶 阅读(308) 评论(0) 推荐(0) 编辑
摘要: //头文件 #ifndef STUDENT_H #define STUDENT_H class Student { public: friend void Print_Student(); //友元声明 Student(const int m_student_id,const char* m_stu 阅读全文
posted @ 2020-04-11 16:07 神迹丶 阅读(225) 评论(0) 推荐(0) 编辑
网站已运行: