
C++
鼻涕炒河粉
这个作者很懒,什么都没留下…
展开
-
C++常用设计模式
1、工厂模式通过一个公共的接口创建对象,一般在创建复杂对象时使用#include <iostream>typedef enum { tankType_56, tankType_96, tankType_num}tankType;//抽象产品类class Tank { virtual const string& type() = 0;};//具体的产品类class Tank_96 : public Tank {public:转载 2021-06-20 21:03:07 · 243 阅读 · 0 评论 -
C++ 散记
1、原创 2021-06-06 19:34:28 · 126 阅读 · 1 评论