2019年11月12日
摘要: 背景代码: std::string topic = topic_name.substr(topic_name.find_last_of('/') + 1); // topic_name中没有'/',这个长度 涉及: 1、find_last_of(); 解析:从string末端开始寻找子串或者字符,如 阅读全文
posted @ 2019-11-12 21:50 高山上的星星 阅读(2000) 评论(0) 推荐(1) 编辑
摘要: json格式的解析不需要自己进行编码实现,已经有好多稳定的开源库可供使用;c++可以使用jsoncpp,c可以使用cjson JsonCpp是一个开源库 下载地址:https://github.com/open-source-parsers/jsoncpp 文档地址:http://open-sour 阅读全文
posted @ 2019-11-12 15:23 高山上的星星 阅读(277) 评论(0) 推荐(0) 编辑