会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
losobo
博客园
首页
新随笔
联系
订阅
管理
[置顶]
c++ 文件的输出输出流(随意指定位置)
摘要: 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)
[置顶]
c++ 的拷贝构造函数
摘要: 当类成员变量有指针类型的时候,要自定义拷贝函数,不要使用默认的拷贝构造函数.因为默认的拷贝构造构造函数是浅拷贝是位拷贝的,只拷贝指针指向的空间而没有把空间里的内容一起拷贝过来,这样会导致改变其中的一个,另一个也会跟着一起改变(老婆也都一样的了) class Teacher { public: Tea
阅读全文
posted @ 2025-09-14 00:55 LOSOB
阅读(8)
评论(0)
推荐(0)
2025年11月25日
类模板的实现
摘要: 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)
2025年11月2日
修仙类(基类,派生类)
摘要: 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)
2025年9月13日
c++
摘要: 1:编译的时候出现由于ucrtbased.dll,无法继续下面的代码.解决方法->把平台改成X64就可以
阅读全文
posted @ 2025-09-13 13:32 LOSOB
阅读(3)
评论(0)
推荐(0)
公告