![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
文章平均质量分 76
huasir_hit
这个作者很懒,什么都没留下…
展开
-
C++中的单例模式和工厂模式
最近在学C++过程中,被两个新名词单例模式和工厂模式搞晕了,到网上找了这两篇博客,本人觉得写得很清晰,有条理,分享下单例模式:http://www.jellythink.com/archives/82工厂模式:http://www.jellythink.com/archives/62转载 2017-07-17 23:37:30 · 3282 阅读 · 0 评论 -
二叉树的遍历(C++、STL)
之前没有使用C++的STL,写二叉树的遍历的时候基本都是选择用递归来实现,了解了C++标准模板库中的stack和queue后,发现遍历二叉树更加简单了,下面给出实例代码,通过实际验证发现这种方法很简洁,很方便#include #include #include #include using namespace std;struct BitNode{ int data;原创 2017-07-23 17:49:46 · 2960 阅读 · 0 评论