随笔分类 -  第三方库

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

点击右上角即可分享
微信分享提示