随笔分类 -  生活-工作

一些琐碎
摘要:[info:文章出自个人网站 www.wilson-loo.com] 游戏服务器框架与互联网产品的认识 我以前进入要玩,其实很大一部分工作还是在提升c++的编程技能、多进程通信、游戏逻辑 这几方面的学习研究;整个人的视野和思维还定位于程序开发 和 程序设计;说的简单点,就是如何将一个程序代码写好,没 阅读全文
posted @ 2016-06-04 12:52 Wilson-Loo 阅读(523) 评论(0) 推荐(0)
摘要:首先看一段代码:#include #include #include int main(){ struct node { int value; }; struct cmp { bool operator()( const node& a, const node& b ) { return a.value , cmp > pri_queue; node n1 = {22}; node n2 = {11}; node n3 = {33}; node n4 = {11}; pr... 阅读全文
posted @ 2013-10-18 01:20 Wilson-Loo 阅读(1194) 评论(0) 推荐(0)
摘要:在地图上某块区域,有数个怪物组成的 "哨兵小组",即不会移动, 但拥有警戒视野, 如图1.这5个哨兵是不会移动, 有站立点可确定一个最小外凸包围圈, 如图2;再产生最小矩形包围圈,如图3.typedef struct Position_t{ INT mapid; INT x; INT y;}Position_t, MapPieceBoundInfo_t;typedef UINT ElementType_t;typedef UINT GUID_t;class GamePlayer{public: BOOL IsMoving(); Position_t Ge... 阅读全文
posted @ 2013-08-11 14:46 Wilson-Loo 阅读(920) 评论(0) 推荐(0)
摘要:error: using typedef-name `T' after `class'templateclass Factory{ friend class T;};class Foo{};int main(){ Factory f; return 0;}按照 http://stackoverflow.com/questions/6321191/using-friend-in-templates提供的解决方案是:使用间接方式:templateclass MakeFriend{public: typedef T Type; };templateclass Factory{... 阅读全文
posted @ 2013-04-15 00:38 Wilson-Loo 阅读(815) 评论(0) 推荐(0)