Chinaunix首页 | 论坛 | 博客
  • 博客访问: 96217
  • 博文数量: 41
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 486
  • 用 户 组: 普通用户
  • 注册时间: 2012-05-18 20:09
文章分类

全部博文(41)

文章存档

2016年(1)

2015年(1)

2014年(9)

2013年(30)

我的朋友

发布时间:2013-07-30 10:30:32

1,最简单的,最直观的,用静态成员函数点击(此处)折叠或打开class test{public:static test* getInstance(){static test s_t;return &s_t;}}2,一种耦合性更低的方法。点击(此处)折叠或打开.........【阅读全文】

阅读(444) | 评论(0) | 转发(0)

发布时间:2013-07-17 16:38:34

templateclass test{T *operator->();T* getData();}------------------------test t;t->func()-----------------------1,非指针对象也能用-> ?    2,为什么可以直接调用T的func(), 不应该 t->->func()t.getData()->func()擦,不知道该怎么描述,反正以.........【阅读全文】

阅读(566) | 评论(0) | 转发(0)

发布时间:2013-07-17 10:38:54

引子: string& s="hi" 为什么编译不通过因为如果通过的话,“hi"是常量字符串,s改变就会改变"hi"的内容,所以编译不通过。const string& s="hi"这样才可以#include <iostream>class test{public: test() {std::cout<<"bbb"<<std::endl;} test(const test& t) {std::cout<<"c.........【阅读全文】

阅读(489) | 评论(0) | 转发(0)

发布时间:2013-07-06 09:37:33

http://cjbskysea.blogbus.com/logs/65099894.html开发工具:windows visual studiolinux kdevelop......【阅读全文】

阅读(586) | 评论(0) | 转发(0)

发布时间:2013-07-04 10:57:28

干货@20130704: 游戏服务器下,iocp用单独线程阻塞accept,而不用异步的acceptEx的理由, acceptEx只有在收到第一组数据的时候才会返回。这样会导致一个bug: 有恶意软件只连接服务器,不发送数据。......【阅读全文】

阅读(499) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册