1 Star 0 Fork 3

411592004/DesignPatternInC

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.c 590 Bytes
一键复制 编辑 原始数据 按行查看 历史
TaoXing 提交于 2019-04-22 13:37 +08:00 . 增加模板方法模式
#include <apr_pools.h>
#include "Game.h"
#include "ExtendTemplate.h"
int main(int argc, char **argv)
{
apr_pool_t *pMemPool;
apr_initialize();
apr_pool_create(&pMemPool, NULL);
Game *pGame = Game_New(pMemPool);
pGame->Play(pGame);
puts("-------------------------------------");
pGame = WithCricketTempl(pGame);
pGame->Play(pGame);
puts("-------------------------------------");
pGame = WithFootballTempl(pGame);
pGame->Play(pGame);
puts("-------------------------------------");
Game_Free(&pGame);
apr_pool_destroy(pMemPool);
apr_terminate();
return EXIT_SUCCESS;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/bailingniao_760/DesignPatternInC.git
git@gitee.com:bailingniao_760/DesignPatternInC.git
bailingniao_760
DesignPatternInC
DesignPatternInC
master

搜索帮助