随笔分类 - 第三方库
摘要:首先创建一个连接 modbus_t *ctx = modbus_new_tcp("172.17.64.54", 9999); while (modbus_connect(ctx) == -1l) { std::cout << "Error: " << modbus_strerror(errno) <
阅读全文
摘要:需求:输出到文件路径含有中文的地址中 问题:直接调用XMLDocument的SaveFile(FILE *file)方法会导致保存的xml文件在文件末尾丢失部分内容 实现如下: wstring wfolderPath = folderPath;wstring fileName(item.first.
阅读全文
摘要:1 //1.复制节点操作 2 XMLElement *newDOType1; 3 //DeepClone可以递归复制当前节点下的全部节点 DeepClone中的参数为目标文档的Document对象 4 tinyxml2::XMLNode *copyNode = newDOType1->DeepClo
阅读全文