会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
秋秋秋秋秋寒
博客园
首页
新随笔
联系
订阅
管理
2025年12月16日
基于LangBot编写插件遇到的bug1——lbp run 错误
摘要: 在官方文档中,有这么一段 其文件中默认的地址为: 由于我是一个先用后看的人,所以我的项目文件有着我之前下过的插件,并且新建的插件文件夹也直接建在了langbot/plugin文件夹中,导致我反复修改都无法启动调试成功,不是拒绝连接就是http 400,甚至以为这个地址要改成NapCat中的webso
阅读全文
posted @ 2025-12-16 21:23 秋秋秋秋秋寒
阅读(2)
评论(0)
推荐(0)
2025年10月23日
C++案例 自定义数组
摘要: #include <string> #include <iostream> #include <algorithm> #include <initializer_list> using namespace std; template<class T> class myArray { // 类模板 友
阅读全文
posted @ 2025-10-23 21:47 秋秋秋秋秋寒
阅读(5)
评论(0)
推荐(0)
2025年10月19日
C++ofstream写文件bug
摘要: 今天学了一下C++的ofstream写文件,代码肯定没问题,环境是win10虚拟机,软件是vs2019 ofstream ofs; ofs.open("test.txt", ios::out); ofs << "姓名:张三" << endl; ofs << "性别:男" << endl; ofs <
阅读全文
posted @ 2025-10-19 20:38 秋秋秋秋秋寒
阅读(4)
评论(0)
推荐(0)
2025年10月18日
C++动态多态原理分析
摘要: class Animal { public: void speak() { cout << "Animal.speak()" << endl; } }; class Cat :public Animal { void speak() { cout << "Cat.speak()" << endl;
阅读全文
posted @ 2025-10-18 23:10 秋秋秋秋秋寒
阅读(9)
评论(0)
推荐(0)
C++类的运算符重载
摘要: 1、加号运算符重载(加减乘除) 首先假设你有一个Person类,里面有个成员变量m_a和m_b,现在你想使p1+p2等价于p1.m_a+p2.m_a,p1.m_b+p2.m_b class Person { public: Person() {}; Person(int a, int b) : m_
阅读全文
posted @ 2025-10-18 21:00 秋秋秋秋秋寒
阅读(31)
评论(0)
推荐(0)
2025年10月15日
const int *p和int *const p快速区分
摘要: const int *p:其地址可变,内容不可变。个人记法为去掉int为const *p,const修饰*p,而*p又指其内容,所以内容不可变。 int * const p:其内容可变,地址不可变。个人记法为去掉int为*const p,const修饰p,p不可变则其地址不可变。 因为这两叫什么常量
阅读全文
posted @ 2025-10-15 21:03 秋秋秋秋秋寒
阅读(4)
评论(0)
推荐(0)
以*this返回局部对象的两种情况
摘要: 1、以值返回局部对象 class Person { public: Person(int age) { this->age = age; } // 以值方式返回局部对象会调用拷贝构造生成一个新的对象返回 Person PersonAddPerson(Person p) { this->age +=
阅读全文
posted @ 2025-10-15 20:37 秋秋秋秋秋寒
阅读(3)
评论(0)
推荐(0)
公告