随笔分类 -  c语言

1
摘要:RTTI(Run-Time Type Information)详解 1. 什么是 RTTI? RTTI(运行时类型信息,Run-Time Type Information)是 C++ 提供的一种机制,允许程序在运行时获取对象的实际类型信息。 它主要用于多态(即基类指针/引用指向派生类对象)场景下,判 阅读全文
posted @ 2025-07-14 15:24 AngDH 阅读(44) 评论(0) 推荐(0)
摘要:#include <iostream> #include <utility> // 目标函数,接收左值引用 void process(int& value) { std::cout << "左值版本: " << value << std::endl; } // 目标函数,接收右值引用 void pr 阅读全文
posted @ 2025-06-12 21:33 AngDH 阅读(19) 评论(0) 推荐(0)
摘要:编译动态库 编译测试文件 编写执行脚本 阅读全文
posted @ 2025-05-15 23:26 AngDH 阅读(10) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2025-04-29 08:28 AngDH 阅读(16) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2024-07-11 09:05 AngDH 阅读(7) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2024-07-06 14:30 AngDH 阅读(10) 评论(0) 推荐(0)
摘要:cmake -S . -B build cmake --build build cmake --build build --config Release cmake --install build 阅读全文
posted @ 2024-06-27 23:33 AngDH 阅读(15) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2024-03-07 11:18 AngDH 阅读(11) 评论(0) 推荐(0)
摘要:右值引用 自己本身是一个左值 #include <iostream> void test(int& x) { std::cout << "ttttt22222\n"; } void test(int&& x) { std::cout << "ttttt1111111\n"; } int main() 阅读全文
posted @ 2024-03-04 22:31 AngDH 阅读(12) 评论(0) 推荐(0)
摘要:引用最大的价值是避免复制 #include <iostream> using namespace std; void method2(int& param) { param = param + 1; cout << "method2 inner:" << param << endl; //metho 阅读全文
posted @ 2023-09-21 13:02 AngDH 阅读(32) 评论(0) 推荐(0)
摘要:#include <iostream> using namespace std; int a{ 1 }; int main() { int a{ 123 }; cout << "外部的a:" << a << endl; //外部的a:123 { cout << "外部的a:" << a << end 阅读全文
posted @ 2023-09-20 18:33 AngDH 阅读(80) 评论(0) 推荐(0)
摘要:std::vector<std::string> split(const std::string& s, char delim) { std::vector<std::string> elems; std::istringstream iss(s); std::string item; while 阅读全文
posted @ 2023-09-08 19:13 AngDH 阅读(69) 评论(0) 推荐(0)
摘要:在C++中,函数的定义确实是由返回类型、函数名和参数列表组成的。但是在某些特殊的情况下,例如回调函数的定义,我们可能会看到类似于BOOL CALLBACK PromptProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM lParam)这样的函 阅读全文
posted @ 2023-08-31 14:14 AngDH 阅读(21) 评论(0) 推荐(0)
摘要:#pragma once #include "include/cef_app.h" class HttpSchemeFactory :public CefSchemeHandlerFactory { public: HttpSchemeFactory() = default; //删除拷贝函数 Ht 阅读全文
posted @ 2023-08-29 11:19 AngDH 阅读(73) 评论(0) 推荐(0)
摘要:一起编译: 静态路径 要用全路径 静态编译 规范写法 阅读全文
posted @ 2023-03-25 16:34 AngDH 阅读(28) 评论(0) 推荐(0)
摘要:gcc -v 查看版本 指定 名字 多文件编译 阅读全文
posted @ 2023-03-25 16:03 AngDH 阅读(18) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2023-02-14 01:15 AngDH 阅读(18) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2023-01-14 13:39 AngDH 阅读(20) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-12-20 21:50 AngDH 阅读(25) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-12-19 22:39 AngDH 阅读(20) 评论(0) 推荐(0)

1