博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
上一页 1 2 3 4 5 6 7 8 ··· 15 下一页

2010年8月4日

摘要: int main() { CustomDialog* pDialog = new CustomDialog(new WindowsWidgetFactory()); pDialog->ShowDialog(); CustomDialog* pMacDialog = new CustomDialog(new MacWidgetFactory()); pMacDialog->Show... 阅读全文

posted @ 2010-08-04 18:37 Zhiyett 阅读(172) 评论(0) 推荐(0) 编辑

2010年8月3日

摘要: 一、设计模式原则 "开-闭"原则:对扩展开发,对接口关闭。 里氏代换原则:若调用的是父类,则换成子类也完全可以运行。是继承复用的基础。 合成复用原则:尽量使用合成关系,少用继承。(尽量对Interface继承,非实现类) 依赖倒转原则:抽象不应该依赖于细节,细节应当依赖于抽象。要针对接口编程,而不是针对实现编程。传递参数,或者在组合聚合关系中,尽量引用层次高的类。(如果一些具体类比较稳定,就... 阅读全文

posted @ 2010-08-03 18:17 Zhiyett 阅读(200) 评论(0) 推荐(0) 编辑

摘要: class IMusicBox{public: virtual void Play() = 0;} class PianoBox: public IMusicBox{public: virtual void Play(){printf("Play PianoBox");}} class ViolinBox: public IMusicBox{public: virtual void Play(... 阅读全文

posted @ 2010-08-03 12:53 Zhiyett 阅读(157) 评论(0) 推荐(0) 编辑

2010年7月28日

摘要: C++的格式化字符串经常用作格式化数字的输出、字符串合并和转换等等很多场合。1. 格式化规定符━━━━━━━━━━━━━━━━━━━━━━... 阅读全文

posted @ 2010-07-28 00:21 Zhiyett 阅读(332) 评论(0) 推荐(0) 编辑

2010年7月7日

摘要: 1.创建表use mastercreate table student( stu_id varchar(10), stu_name varchar(50), sex varchar(10), age int, grade int, class varchar(10), primary key(stu_id))2.插入insert into studentvalues('3005218075','小... 阅读全文

posted @ 2010-07-07 01:14 Zhiyett 阅读(255) 评论(0) 推荐(0) 编辑

2010年6月21日

摘要: 11.1 在http://www.lua.org/ftp/中下载lua-5.1.4.tar.gz1.2 新建静态库,不要勾选“Pre-Compiled Header”和“MFC Support”选项.1.3 将所有src中的所有 .c (lua.c除外)和 .h 文件加入到工程中1.4 点击“属性-c/c++-高级-编译为”,... 阅读全文

posted @ 2010-06-21 16:06 Zhiyett 阅读(2223) 评论(1) 推荐(0) 编辑

摘要: □ 游戏开发书籍: ☆游戏入门: △《Visual C++游戏编程基础》 ☆ 游戏原理: △《3D数学基础:图形与游戏开发》 主要研究隐藏在3D几何世界背后的数学问题。 △《计算机图形学几何工具算法详解》 3d数学计算 △《人工智能游戏编程真言》 里面有一篇 “4.3 建立接近最优的导航网格... 阅读全文

posted @ 2010-06-21 15:37 Zhiyett 阅读(353) 评论(0) 推荐(0) 编辑

2010年6月17日

摘要: DemoProject1工程: DemoProject2工程: 阅读全文

posted @ 2010-06-17 16:21 Zhiyett 阅读(182) 评论(0) 推荐(0) 编辑

2010年5月25日

摘要: 强制结束进程用TerminateProcess(GetCurrentProcess(),0);退出当前窗口用PostQuitMessage(WM_QUIT);退出exit(0);或ExitProcess(0); // 0表示正常退出 阅读全文

posted @ 2010-05-25 19:23 Zhiyett 阅读(560) 评论(0) 推荐(0) 编辑

2010年5月18日

摘要: GameLoop()中static uint32 s_dwPreTime = 0; uint32 dwCurrentTime = CStaticFunc::GetTime(); uint32 dwElapsed = dwCurrentTime - s_dwPreTime; if (m_bLimitF... 阅读全文

posted @ 2010-05-18 16:01 Zhiyett 阅读(580) 评论(0) 推荐(1) 编辑

上一页 1 2 3 4 5 6 7 8 ··· 15 下一页