上一页 1 ··· 49 50 51 52 53 54 55 56 57 ··· 66 下一页
摘要: NULL、0、nullptrC的NULL在C语言中,我们使用NULL表示空指针,也就是我们可以写如下代码: int *i = NULL;foo_t *f = NULL; 实际上在C语言中,NULL通常被定义为如下: #define NULL ((void *)0) 也就是说NULL实际上是一个voi... 阅读全文
posted @ 2014-05-23 22:24 zzyoucan 阅读(407) 评论(0) 推荐(0) 编辑
摘要: 今天真是坑啊,vs下配置mongo,搞了半天老是提示一个无法打开.lib的链接错误,结果最后发现是编译器选项少了一个BOOST_ALL_NO_LIB,又被坑了,最不喜欢,为了编译或者装个什么东西,搞个word文档在那配置,完全不懂到底在那干什么,原来在linux上装Oracle,搞了一两个星期,到最... 阅读全文
posted @ 2014-05-22 00:12 zzyoucan 阅读(135) 评论(0) 推荐(0) 编辑
摘要: windows下编译mongo终于可以了,终于生成了mongoclient.lib,耗了我这么长时间,接下来还有vs配置 阅读全文
posted @ 2014-05-20 23:57 zzyoucan 阅读(98) 评论(0) 推荐(0) 编辑
摘要: c++指针只能说博大精深,在用的时候感觉好晕1.指针类型转换/*在指针的强制类型转换:ptr1=(TYPE*)ptr2中,如果sizeof(ptr2的类型)大于sizeof(ptr1的类型),那么在使用指针ptr1来访问ptr2所指向的存储区时是安全的。如果sizeof(ptr2的类型)小于size... 阅读全文
posted @ 2014-05-17 00:45 zzyoucan 阅读(350) 评论(0) 推荐(0) 编辑
摘要: 1.基础知识/*可以定义大小是0的数组,但不能引用,因为没有指向任何对象new string[10]调用类的默认构造函数new int[10]没有初始化,但new int[10]()会将数组初始化成0,返回第一个元素的首地址*/#include #include using namespace st... 阅读全文
posted @ 2014-05-16 22:28 zzyoucan 阅读(350) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;struct MyStruct{ int s;};int main(){ void* addr = new MyStruct;//缓冲区地址,大小为mysturct的大小 int * naddr = new (addr)in... 阅读全文
posted @ 2014-05-16 00:42 zzyoucan 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 1.sprintf,sprintf_ssprintf(char* buffer, const char* format, [argument]);vs下需要加上_CRT_SECURE_NO_WARNINGS#include using namespace std;int main(){ cha... 阅读全文
posted @ 2014-05-15 23:01 zzyoucan 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 也许是由于生活很艰辛,大家都疲于奔命,而没有去思考自己是否生于一个正常的国度,而且认为一切都很正常平静,努力的提高自己,然后改变自己,然后更加的疲于奔命,我相信大多数人都是这种状态。 阅读全文
posted @ 2014-05-15 21:15 zzyoucan 阅读(102) 评论(0) 推荐(0) 编辑
摘要: std::vector > level_info_vec; i->load_level_info(level_info_vec); ActorLevelInfo levelInfo = {0}; levelInfo = level_info_vec[0][1]; //int userID = 10... 阅读全文
posted @ 2014-05-14 21:38 zzyoucan 阅读(295) 评论(0) 推荐(0) 编辑
摘要: UserInfo uinfo = {0}; uinfo.userID = 5555; strcpy(uinfo.userName, "UserHost5555"); strcpy(uinfo.userPwd, "123456"); i->addUser_(uinfo); ... 阅读全文
posted @ 2014-05-14 11:26 zzyoucan 阅读(158) 评论(0) 推荐(0) 编辑
上一页 1 ··· 49 50 51 52 53 54 55 56 57 ··· 66 下一页