会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
leochan007
博客园
首页
新随笔
联系
订阅
管理
[置顶]
c++_成员函数回调
摘要: // #include <vcl.h> #pragma hdrstop #include "Unit1.h" // #pragma package(smart_init) #pragma resource "*.dfm" TForm1 *Form1; class CAppleDemo { publi
阅读全文
posted @ 2020-10-21 15:36 leochan007
阅读(171)
评论(0)
推荐(0)
2025年5月26日
c++void*与map强转
摘要: #include <iostream> #include <map> int main() { std::map<int, int> myMap = { {1, 100}, {2, 200}, {3, 300} }; void* ptr = &myMap; // 安全转换 + 检查 if (!ptr
阅读全文
posted @ 2025-05-26 11:17 leochan007
阅读(7)
评论(0)
推荐(0)
2025年1月23日
获取1.5小时之前的代码
摘要: #include <iostream> #include <chrono> #include <ctime> #include <iomanip> #include <sstream> int main() { // 获取当前时间点 auto now = std::chrono::system_cl
阅读全文
posted @ 2025-01-23 16:36 leochan007
阅读(8)
评论(0)
推荐(0)
2024年12月27日
变量名变成字符串
摘要: #define STRINGIFY(x) #x int someVariable = 10; std::cout << STRINGIFY(someVariable) << " = " << someVariable << std::endl;
阅读全文
posted @ 2024-12-27 11:37 leochan007
阅读(6)
评论(0)
推荐(0)
2024年12月24日
时间字符串比较大小
摘要: #include <iostream> #include <sstream> #include <iomanip> #include <ctime> bool compareTimeStrings(const std::string& timeStr1, const std::string& tim
阅读全文
posted @ 2024-12-24 15:47 leochan007
阅读(19)
评论(0)
推荐(0)
2024年12月12日
二进制输出
摘要: #include <stdio.h> void print_binary(unsigned int n) { for (int i = sizeof(n) * 8 - 1; i >= 0; i--) { printf("%d", (n >> i) & 1); } printf("\n"); } vo
阅读全文
posted @ 2024-12-12 17:51 leochan007
阅读(11)
评论(0)
推荐(0)
2024年3月20日
mfc进程方面处理
摘要: // 获取某个进程ID DWORD GetTaskManagerProcessId() { DWORD taskManagerProcessId = 0; PROCESSENTRY32 pe32; pe32.dwSize = sizeof(PROCESSENTRY32); HANDLE hProce
阅读全文
posted @ 2024-03-20 17:48 leochan007
阅读(22)
评论(0)
推荐(0)
2024年2月18日
computed
摘要: Computed properties are unique data types that will reactively update only when the source data used within the property is updated. By defining a dat
阅读全文
posted @ 2024-02-18 08:57 leochan007
阅读(36)
评论(0)
推荐(0)
2024年1月28日
windows端口
摘要: 一、解决方案 1、错误原因 “地址 localhost:1099 已在使用中“,是1099程序被占用,把1099程序后台停止掉即可。 2、解决方案 1、快捷键win+R打开CMD运行 netstat -aon | find "1099" 2、运行代码,找到程序 tasklist | find "56
阅读全文
posted @ 2024-01-28 11:24 leochan007
阅读(30)
评论(0)
推荐(0)
2024年1月3日
拷贝文件
摘要: #include <iostream> #include <fstream> int main() { std::ifstream sourceFile("source.txt", std::ios::binary); // 打开源文件 if (!sourceFile) { std::cout <<
阅读全文
posted @ 2024-01-03 12:31 leochan007
阅读(11)
评论(0)
推荐(0)
2023年12月5日
c++有用链接
摘要: 新手VSCode配置C++20 Makefile教程1 快速入门 HTTP 代理服务器的设计与实现(C++)
阅读全文
posted @ 2023-12-05 11:49 leochan007
阅读(14)
评论(0)
推荐(0)
下一页
公告