摘要: ###适配器 AdaptorModle.h #pragma once #include <iostream> #include <string> using namespace std; //本软件 音乐播放器支持 3gp格式 不支持mp4 和 ts格式 //其他软件 播放器不能支持 3gp格式 支 阅读全文
posted @ 2023-02-07 16:51 Bell123 阅读(14) 评论(0) 推荐(0) 编辑
摘要: ###原型模式 ####要点:clone一个对象 拷贝构造函数必须重写 #define _CRT_SECURE_NO_WARNINGS//这里编译没通过,所以去属性里面改吧 先换成strcpy_s用 #include <iostream> using namespace std; class Stu 阅读全文
posted @ 2023-02-07 14:54 Bell123 阅读(8) 评论(0) 推荐(0) 编辑
摘要: ###建造者 模式 builderModle.h #pragma once #include <iostream> #include <string> using namespace std; class Phone { public: Phone() {} ~Phone() {} void set 阅读全文
posted @ 2023-02-07 12:49 Bell123 阅读(12) 评论(0) 推荐(0) 编辑
摘要: ###简易单例模型 easysiglemodle.h #ifndef EASYSIGLEMODLE_H #define EASYSIGLEMODLE_H #include <iostream> using namespace std; class EasySingleModle{ public: s 阅读全文
posted @ 2023-02-07 12:33 Bell123 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 工厂模式 #include <iostream> #include <string> using namespace std; class Shape { public: virtual void draw() = 0; }; class Rectangle : public Shape { pub 阅读全文
posted @ 2023-02-07 12:18 Bell123 阅读(12) 评论(0) 推荐(0) 编辑