mirror of
https://github.com/huihut/interview.git
synced 2024-03-22 13:10:48 +08:00
new
This commit is contained in:
parent
444953ad43
commit
4252d8e5f3
|
@ -11,31 +11,30 @@
|
|||
|
||||
int main() {
|
||||
std::cout << "*******************" << std::endl;
|
||||
std::cout << "** 设计模式例子 **" << std::endl;
|
||||
std::cout << "** <EFBFBD><EFBFBD><EFBFBD>ģʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> **" << std::endl;
|
||||
std::cout << "*******************" << std::endl;
|
||||
|
||||
std::cout << "*******************" << std::endl;
|
||||
std::cout << "** 单例模式 **" << std::endl;
|
||||
std::cout << "** <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ **" << std::endl;
|
||||
std::cout << "*******************" << std::endl;
|
||||
SingletonMain();
|
||||
|
||||
std::cout << "*******************" << std::endl;
|
||||
std::cout << "** 抽象工厂模式 **" << std::endl;
|
||||
std::cout << "** <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ **" << std::endl;
|
||||
std::cout << "*******************" << std::endl;
|
||||
FactoryMain();
|
||||
|
||||
std::cout << "*******************" << std::endl;
|
||||
std::cout << "** 适配器模式 **" << std::endl;
|
||||
std::cout << "** <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ **" << std::endl;
|
||||
std::cout << "*******************" << std::endl;
|
||||
AdapterMain();
|
||||
|
||||
std::cout << "*******************" << std::endl;
|
||||
std::cout << "** 桥接模式 **" << std::endl;
|
||||
std::cout << "** <EFBFBD>Ž<EFBFBD>ģʽ **" << std::endl;
|
||||
std::cout << "*******************" << std::endl;
|
||||
BridgeMain();
|
||||
|
||||
std::cout << "*******************" << std::endl;
|
||||
std::cout << "** 观察者模式 **" << std::endl;
|
||||
std::cout << "** <EFBFBD>۲<EFBFBD><EFBFBD><EFBFBD>ģʽ **" << std::endl;
|
||||
std::cout << "*******************" << std::endl;
|
||||
ObserverMain();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user