摘要: include<Windows.h> include include include include using namespace std; //定义一个获取当前文件的大小 long long getFileSize(const char * filename) //传递一个文件名的指针 { fs 阅读全文
posted @ 2025-10-06 13:01 LOSOB 阅读(10) 评论(0) 推荐(0)
摘要: 当类成员变量有指针类型的时候,要自定义拷贝函数,不要使用默认的拷贝构造函数.因为默认的拷贝构造构造函数是浅拷贝是位拷贝的,只拷贝指针指向的空间而没有把空间里的内容一起拷贝过来,这样会导致改变其中的一个,另一个也会跟着一起改变(老婆也都一样的了) class Teacher { public: Tea 阅读全文
posted @ 2025-09-14 00:55 LOSOB 阅读(8) 评论(0) 推荐(0)
摘要: pragma once include using namespace std; template class Myvector { friend ostream& operator<< (ostream& out, const Myvector & othervectr); //用有元函数重载输出 阅读全文
posted @ 2025-11-25 22:37 LOSOB 阅读(3) 评论(0) 推荐(0)
摘要: include include include "Cultivator.h" include"SpritStone.h" include"Dembeast.h" define CU_SWORD 200 //修仙者战斗力的基数 define SC_TRADE_Demb_SP 2 //以所要卖出妖兽的灵 阅读全文
posted @ 2025-11-02 22:44 LOSOB 阅读(5) 评论(0) 推荐(0)
摘要: 1:编译的时候出现由于ucrtbased.dll,无法继续下面的代码.解决方法->把平台改成X64就可以 阅读全文
posted @ 2025-09-13 13:32 LOSOB 阅读(3) 评论(0) 推荐(0)