11 2024 档案
摘要:C++ Lambda 表达式 快速入门 // lambda 函数 // 本质上:就是匿名函数 auto lam = [] {cout << "hello world";}; lam(); // 使用 lambda 函数 auto add = [](int a, int b)->int { retur
阅读全文
摘要:日志打印 OffsetT OffsetT<float> dragOffset = OffsetT<float>(offsetX, offsetY); LOGE("aclq dragOffset: %{public}f, %{public}f", dragOffset.GetX(), dragOffs
阅读全文
摘要:IPC(InterProcess Communication):进程间通信
阅读全文
摘要:临时对象 1. 临时对象的概念 一些临时对象,是因为我们代码书写问题而产生的。统一称临时变量为临时对象 new delete 栈 2. 产生临时对象的情况和解决 3 种情况和解决方案 class CTempValue{ public: int val1; int val2; public: CTem
阅读全文
摘要:Cannot find the Word document template:WordToRgm.dot 选择 word 选项 把这个干掉
阅读全文
摘要:左值、右值、左值引用,右值引用,std::move函数 1. 左值和右值 int i = 10; // 对象:一块内存区域 i = 20; // 左值:能用在赋值语句等号左侧的东西,它能够代表 一个地址 // 右值:不能作为左值的就是右值 // 结论:C++ 的一条表达式,要么就是左值,要么就是右值
阅读全文
摘要:临时对象深入探讨,解析,提高性能手段 1. 临时对象概念 2. 产生临时对象的情况和解决 以传值的方式给函数传递参数 类型转换生成的临时对象 / 隐式类型转换以保证函数调用成功 函数返回对象的时候
阅读全文