上一页 1 2 3 4 5 6 7 8 ··· 32 下一页
摘要: 32位: char 1字节 short 2字节 int 4字节 long 4字节 指针 4字节 64位: char 1字节 short 2字节 int 4字节 long 8字节 指针 8字节 阅读全文
posted @ 2017-03-11 21:50 xshang 阅读(797) 评论(0) 推荐(0) 编辑
摘要: 1、游戏服务器开发和普通服务器开发的区别 2、用strcpy实现memcpy的功能 3、不用任何库函数,实现字符串的拷贝 4、双向链表逆置 5、数据库备份命令 6、linux文件系统和windows文件系统的区别 7、软连接和硬链接的区别 8、单例模式 9、常量指针和指针常量 10、条件断点 11、 阅读全文
posted @ 2017-03-10 22:09 xshang 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 单例模式只有一个实例,多用于共享资源,不如数据库和线程池 单例模式的特点: 1、一个私有构造器,确保只有一个实例; 2、一个静态方法,用于获取实例; 3、一个静态变量,保存实例,静态变量可以被实例共享 阅读全文
posted @ 2017-01-22 16:50 xshang 阅读(151) 评论(0) 推荐(0) 编辑
摘要: QToolButton *button = new QToolButton(this); button->resize(100,30); button->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); QStyle* style = QApplication::style(); QIcon icon = style->standardIcon(... 阅读全文
posted @ 2017-01-17 10:26 xshang 阅读(4566) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std; void print(int elem) { cout &vec, int left, int right) { if(left key) { high--; } ... 阅读全文
posted @ 2017-01-14 20:45 xshang 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 只需一条命令: sudo apt install libboost-dev 阅读全文
posted @ 2017-01-11 22:07 xshang 阅读(231) 评论(0) 推荐(0) 编辑
摘要: boost array是一种静态数组,比stl中的vector效率高 阅读全文
posted @ 2017-01-06 09:09 xshang 阅读(1113) 评论(0) 推荐(0) 编辑
摘要: 今天是2016年的最后一天,看到大家都写年终总结,不禁心里感慨万千。 回顾过往一年,真的是充满了纠结和困难,也实现了自己进步的一年。 其中最大的事情就是我从PHP转到了C++,从京东离职跳到了一家一百多人的小公司。(虽然有些遗憾,但是自己好像并不后悔) 说来话长,在京东时是做PHP的,从研究生毕业就 阅读全文
posted @ 2016-12-31 20:58 xshang 阅读(675) 评论(0) 推荐(0) 编辑
摘要: QElapsedTimer et;et.start();while(et.elapsed() < 1000) QCoreApplication::processEvents(); 阅读全文
posted @ 2016-12-07 17:19 xshang 阅读(2826) 评论(0) 推荐(0) 编辑
摘要: 1、下载qt源码,我下载的是4.7.1版本 2、vs安装qt插件qt-add-in 3、进入qt根目录,打开configure文件,找到 QT_DEFAULT_BUILD_PARTS="libs tools translations",把examples,docs,demos删除,这样可以加快编译速 阅读全文
posted @ 2016-11-15 13:35 xshang 阅读(1067) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 32 下一页