Loading

随笔分类 -  c++语法知识

各类c++语法知识
摘要:PIMPL(Pointer to Implementation)本质上也属于设计模式的一种,PIMPL也称为 Opaque Pointer(不透明的指针)。主要目的是将一个类的 实现细节(private/protected 方法、成员) 和 其对外的公共接口 分离出来,使得 实现细节 可以在不影响客 阅读全文
posted @ 2024-02-21 17:46 Christopher_James 阅读(51) 评论(0) 推荐(0)
摘要:红黑树 1 红黑树的引入 有了二叉搜索树,为什么还需要平衡二叉树? 二叉搜索树容易退化成一条链, 这个时候查找时间复杂度从 \(O(log_2N)\) 退化成 \(O(N)\) 引入对左右子树高度差有限制的平衡二叉树,保证查找操作的最坏时间复杂度也为 \(O(log_2N)\) 有了平衡二叉树,为什 阅读全文
posted @ 2022-06-08 22:07 Christopher_James 阅读(105) 评论(0) 推荐(0)
摘要:Why I write First of all, write down the whole process of how I encountered these problems when I learned how to overload the function call operator, 阅读全文
posted @ 2021-06-04 20:16 Christopher_James 阅读(93) 评论(0) 推荐(0)
摘要:Why I write First of all, write down the whole process of how I encountered these problems when I learned how to overload the function call operator, 阅读全文
posted @ 2021-05-25 21:45 Christopher_James 阅读(140) 评论(0) 推荐(0)