上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 66 下一页
摘要: map 玩家上线else if(gs2ms_add_player == pkt.cmd){ PlayerChannel* pPC = new PlayerChannel(this); //加到地图中,但是并未激活该玩家 int nChannelId = pPC->OnPlayerE... 阅读全文
posted @ 2015-01-19 02:12 zzyoucan 阅读(183) 评论(0) 推荐(0) 编辑
摘要: #ifndef _RingQueue_H_#define _RingQueue_H_#include templateclass RingQueue{public: //----------------------------------------------------- // 构造... 阅读全文
posted @ 2015-01-11 14:21 zzyoucan 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 早晨起早洗了个早,感觉还早小睡一下,结果一觉睡到了9点40,上个月本来迟到的就很多,又弄出这种情况,被经理问东问西的,我现在都不好意思再迟到了。。 阅读全文
posted @ 2015-01-09 00:39 zzyoucan 阅读(105) 评论(0) 推荐(0) 编辑
摘要: #include #include void f(int& n1, int& n2, const int& n3){ std::cout bound_f = std::bind(f, n1, std::ref(n2), std::cref(n3)); n1 = 10; n2 = ... 阅读全文
posted @ 2015-01-05 10:09 zzyoucan 阅读(193) 评论(0) 推荐(0) 编辑
摘要: #include class Point3d{public: virtual ~Point3d(){}public: static Point3d origin; float x, y, z;};//从打印的地址看出这个类的结构应该是vptr|x|y|z,vptr是放类空间的头部的... 阅读全文
posted @ 2015-01-03 17:04 zzyoucan 阅读(433) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;//关于类不展现按位拷贝语义的几种情况/** *1.类的成员对象含有默认拷贝函数 *2.继承的基类包含拷贝函数(无论是合成的还是自己定义的) *3.有虚函数,因为虚指针按位拷贝有问题 *4.派生自虚基类 */ class Word{publ... 阅读全文
posted @ 2015-01-02 22:05 zzyoucan 阅读(165) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;//word类展现了默认拷贝语义,不会合成默认拷贝构造函数,而是对于每一个成员变量实时memberwise的bitcopyclass Word{public: Word(const char*) { } ~Word()... 阅读全文
posted @ 2015-01-02 16:16 zzyoucan 阅读(181) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;class A{public: virtual ~A(){cout<<"A destructor---"<<endl;}};class B:public A{public: B(){cout<<"B----constructor-... 阅读全文
posted @ 2015-01-02 15:27 zzyoucan 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 有时候,基类构造函数是带有参数,而子类构造函数是不带参数的,如下:class Animal{public: Animal(int width, int height) { this->width = width; this->height = height; }private: int ... 阅读全文
posted @ 2015-01-02 14:55 zzyoucan 阅读(420) 评论(0) 推荐(0) 编辑
摘要: /***1.宏会在编译器在对源代码进行编译的时候进行简单替换,不会进行任何逻辑检测,即简单代码复制而已。2.宏进行定义时不会考虑参数的类型。3.参数宏的使用会使具有同一作用的代码块在目标文件中存在多个副本,即会增长目标文件的大小。4.参数宏的运行速度会比函数快,因为不需要参数压栈/出栈操作。5.参数... 阅读全文
posted @ 2015-01-02 14:44 zzyoucan 阅读(176) 评论(0) 推荐(0) 编辑
上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 66 下一页