摘要:设计模式: 原则: 开闭原则,里氏替换原则,接口隔离,迪米特原则,单一职责,依赖倒置 创建:factory,singleton,prototype,builder,simple factory 结构:decorator,proxy,bridge,iterator 行为:observer,comman
阅读全文
摘要:CommonInc.h 1 #pragma once 2 #include <iostream> 3 #include <vector> 4 #include <deque> 5 #include <stack> 6 7 // BFS 使用了deque 8 // DFS 使用了递归,什么时候使用了s
阅读全文
摘要:// Stack.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include <iostream> #include <stdio.h> #include <string> using namespace std; //这里用的是链表节点实现的Node stru
阅读全文
摘要:#include <iostream> #include <stdio.h> #include <string> using namespace std; struct DequeNode { int Data; //无论是插入或者删除都需要更新prev next DequeNode* prev;
阅读全文
摘要:通过创建管道,捕获子进程(控制台进程)的输入和输出 // Console.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include <Windows.h> #include <iostream> #include <string> #include <fstr
阅读全文
摘要:c++ 11std::ref 引用 头文件#include <functional>std::cref const引用std::move right refstd::decay 类型转换std::bindstd::bind1ststd::make_sharedstd::tuple 多个值的pair集
阅读全文