04 2020 档案

摘要:```C++#include #include #include #include #include #include #include #include using namespace std;int fd1[2], fd2[2];void fun1(){ cout = 100){ cout 100){ cout << "fun2 end\n"; return;} ... 阅读全文
posted @ 2020-04-21 08:16 moxin0509 阅读(220) 评论(0) 推荐(0) 编辑
摘要:```C++ #include #include #include #include using namespace std; class sharedPtr{ public: sharedPtr(){ cout << "call default construct\n"; }; sharedPtr(int *_next, int *_val):next(_next), val(_val){ co 阅读全文
posted @ 2020-04-20 16:56 moxin0509 阅读(164) 评论(0) 推荐(0) 编辑
摘要:```C++ #include #include #include #include #include using namespace std; pthread_cond_t qready = PTHREAD_COND_INITIALIZER; pthread_mutex_t qlock = PTHREAD_MUTEX_INITIALIZER; bool flag = false; int i = 阅读全文
posted @ 2020-04-20 00:37 moxin0509 阅读(299) 评论(0) 推荐(0) 编辑
摘要:策略模式 Strategy模式可以用来替换if else 观察者模式 Observer/Event 通知依赖关系 所有的依赖对象都将得到通知ß 工厂模式 Factory Method 对象创建模式 绕开new,来避免对象创建过程中的紧耦合 面向接口的编程 new带来了细节依赖 抽象工厂 Abstra 阅读全文
posted @ 2020-04-09 16:31 moxin0509 阅读(166) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示