
c++
十指流玉
小菜菜,还在学习中~~~~~
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C++ 单件模式
#include <iostream> #include <stdio.h> #include <string.h> using namespace std; class singleton { public: static singleton* getInstance(); int getValue(); void setValue...原创 2020-03-21 15:13:11 · 273 阅读 · 0 评论 -
C++策略模式对比
电商网络交易平台模拟 策略模式 #include <iostream> #include <stdio.h> #include <string.h> using namespace std; //策略,模拟电商平台 class BusinessOnline { public: virtual void Select() = 0; virtu...原创 2020-03-14 21:44:09 · 289 阅读 · 0 评论 -
C++模板模式对比
C++模板模式对比 模拟淘宝购买手机过程 使用模板模式 #include <iostream> using namespace std; //数据层 class Phone { private: string name; int price; bool new_hot; public: void SetName(){string n;cin&...原创 2020-03-08 13:35:55 · 261 阅读 · 0 评论