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