上一页 1 ··· 48 49 50 51 52 53 54 55 56 ··· 66 下一页
摘要: #include #include using namespace std;int main(){ int pid = GetCurrentProcessId(); auto path = Plug::GetCurrentPath();//返回std::wstring path +... 阅读全文
posted @ 2014-05-27 22:49 zzyoucan 阅读(188) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;int main(){#if 1 int num = 12345; char str[25];//不要写成char*,因为没有分配空间 itoa(num, str, 10);//10进制字符串 printf("num ... 阅读全文
posted @ 2014-05-27 22:15 zzyoucan 阅读(229) 评论(0) 推荐(0) 编辑
摘要: #include #include struct pos2d{ int x; int y;};using namespace std;int main(){ //boost::interprocess::shared_memory_object类是按照单个字节的方式读写共享内存,用... 阅读全文
posted @ 2014-05-27 21:17 zzyoucan 阅读(869) 评论(0) 推荐(0) 编辑
摘要: 自从装了64位新系统,每次开机我都很高兴,因为比原来快了好几倍,以前装个oracle,sql server,电脑成卡的一B,现在就有个mongo,真爽。再加换了一个新鼠标真是如虎添翼。 阅读全文
posted @ 2014-05-26 22:34 zzyoucan 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 1 前言Libevent是一个轻量级的开源高性能网络库,使用者众多,研究者更甚,相关文章也不少。写这一系列文章的用意在于,一则分享心得;二则对libevent代码和设计思想做系统的、更深层次的分析,写出来,也可供后来者参考。附带一句:Libevent是用c语言编写的(MS大牛们都偏爱c语言哪),而且... 阅读全文
posted @ 2014-05-25 23:08 zzyoucan 阅读(894) 评论(0) 推荐(0) 编辑
摘要: client.cpp// App02.cpp : 定义控制台应用程序的入口点。//#include #include #include #include #include #include #include #ifndef WIN32#include # ifdef _XOPEN_SOURCE_EX... 阅读全文
posted @ 2014-05-25 23:06 zzyoucan 阅读(591) 评论(0) 推荐(0) 编辑
摘要: 很多时候,除了响应事件之外,应用还希望做一定的数据缓冲。比如说,写入数据的时候,通常的运行模式是:l决定要向连接写入一些数据,把数据放入到缓冲区中l等待连接可以写入l写入尽量多的数据l记住写入了多少数据,如果还有更多数据要写入,等待连接再次可以写入这种缓冲IO模式很通用,libevent为此提供了一... 阅读全文
posted @ 2014-05-25 14:25 zzyoucan 阅读(510) 评论(0) 推荐(0) 编辑
摘要: 这个plug组件不知到底是什么东西,不知何com组件什么区别#include #include #include "D:\HELL0\I_HELL0.h"using namespace std;int main(){ INIT_PLUG I_HELL0* tf = NEW(HELL0);... 阅读全文
posted @ 2014-05-24 01:06 zzyoucan 阅读(208) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std;//使用宽字符,我猜是为了适应那些要使用宽字符的国家int main(){ auto path = Plug::GetCurrentPath();//返回std::wstring宽字符 std::wstring ... 阅读全文
posted @ 2014-05-23 23:30 zzyoucan 阅读(2237) 评论(0) 推荐(0) 编辑
摘要: ·C语言相关 对应于char, C语言中也有宽字符内型wchar_t。wchar_t被定义为:typedef unsigned shortwchar_t;显然它是16位的。wchar_t类型的常字串应该这样写:L"hello"。因此可以这样定义一个宽字符指针wchar_t *pwc=L"hello... 阅读全文
posted @ 2014-05-23 23:07 zzyoucan 阅读(1491) 评论(0) 推荐(0) 编辑
上一页 1 ··· 48 49 50 51 52 53 54 55 56 ··· 66 下一页