上一页 1 ··· 55 56 57 58 59 60 61 62 63 ··· 66 下一页
摘要: void asynDBCenter::isGetActorInfoEx(void* on_process, const char* arg){ std::stringstream ros(arg); boost::property_tree::ptree pt; boost::property_tree::read_json(ros, pt); int actorID = pt.get("actorID"); ActorInfoEx info={0}; bool ret = m_dbcenter->getActorInfoEx(actorID, &info). 阅读全文
posted @ 2014-04-11 13:34 zzyoucan 阅读(9720) 评论(0) 推荐(0) 编辑
摘要: 使用 std::stringstream,小心 内存! 适时 清空 缓冲 ……2007年12月14日 星期五 16:25 stringstream是个好东西,网上有不少文章,讨论如何用它实现各种数据类型的转换(比如把double或int转换为string类型)。但如 果stringstream使用不当,当心内存出问题(我就吃过亏^_^)。 试试下面的代码,运行程序前打开任务管理器,过不了几十秒,所有的内存都将被耗尽!#include #include #include using namespace std;/////////////////////////////////////... 阅读全文
posted @ 2014-04-10 12:12 zzyoucan 阅读(2041) 评论(0) 推荐(0) 编辑
摘要: "{ "A":1, "B":{ "C":2, "D":3 }, "E":[ {"F":4}, {"F":5} ]}"#include#include #include using namespace std;using namespace boost::property_tree;//其实有点像std::list,自己可以构造一个任何类型的节点插进去,特别数组类型,用法太灵活了int main(){ std::string json = 阅读全文
posted @ 2014-04-10 10:07 zzyoucan 阅读(400) 评论(0) 推荐(0) 编辑
摘要: bool DBCenter::setUserTableTest(){ //修改user表 UseTable(m_userTable); for (int i = 999; i FindOneData(m_ns.c_str(), condJson, secJson, &Res, &i... 阅读全文
posted @ 2014-04-09 16:43 zzyoucan 阅读(227) 评论(0) 推荐(0) 编辑
摘要: char * __cdecl strstr ( const char * str1, const char * str2 ){ char *cp = (char *) str1; char *s1, *s2; if ( !*str2 ) return((char *)str1); while (*cp) { s1 = cp; s2 = (char *) str2; whil... 阅读全文
posted @ 2014-04-09 15:07 zzyoucan 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 为什么我的眼里常含着泪水,因为我深深的爱着这片土地---艾青我深深的喜欢着家乡的那篇土地,因为她包容你的一切,可以和自己的母亲比肩,同样也爱着家乡的人,因为他们的质朴,辛勤的劳动,一种一分劳动一分收获的精神。我不喜欢到外面旅游,因为我有时间的话就会到家附近的山上逛逛。 阅读全文
posted @ 2014-04-08 21:38 zzyoucan 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 今个真是困惑了,很少有这么困过,估计回家过来不适应啊。 阅读全文
posted @ 2014-04-08 14:47 zzyoucan 阅读(126) 评论(0) 推荐(0) 编辑
摘要: // std_tr1__memory__shared_ptr_reset.cpp // compile with: /EHsc #include #include struct deleter { void operator()(int *p) { delete p; } }; int main() { std::shared_ptr sp(new int(5)); //std::boolalpha bool类型输出为true或者false而不是0或者1,默认输出0和1 //reset更换管理对象 std::cout <<... 阅读全文
posted @ 2014-04-07 21:19 zzyoucan 阅读(1052) 评论(0) 推荐(0) 编辑
摘要: 1 目 录 1 STL 简介 .............................................................................................................................................. 2 2 顺序性容器 .................................................................................................................................... 阅读全文
posted @ 2014-04-04 18:01 zzyoucan 阅读(530) 评论(0) 推荐(0) 编辑
摘要: 1.简单查询//xid=560870 and type=video{"xid": 560870,"type": "video"}//查询数组中的数据array("fruit.name"=>'aa')返回如:array ( 'fruit' => array ( 'name' => 'aa'... 阅读全文
posted @ 2014-04-02 12:02 zzyoucan 阅读(936) 评论(0) 推荐(0) 编辑
上一页 1 ··· 55 56 57 58 59 60 61 62 63 ··· 66 下一页