c – 文件打开时“QIODevice :: write:device not open”

weixin_38063515 2019-09-12 12:32:33
当我编译我的程序时,我得到错误消息“QIODevice :: write:device not open”这个程序在我的旧计算机上运行但由于某种原因它不能在我的新计算机上运行.任何有关如何修复此错误的见解将非常感谢,谢谢. file.open(QIODevice::Append); file2.open(QIODevice::Append); QTextStream stream(&file); //stream of information QTextStream stream2(&file2); //write to file //code continued here, deleted to post here... stream << whatever, stream2 << whatever whatever... //end stream stream << endl; stream2 << endl; //close file file.close(); file2.close();
...全文
1456 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
weixin_38067080 2019-09-12
  • 打赏
  • 举报
回复
问题是我在这台计算机上不存在的地方创建文件更改了创建文件夹的位置并修复了它.

433

社区成员

发帖
与我相关
我的任务
社区描述
其他技术讨论专区
其他 技术论坛(原bbs)
社区管理员
  • 其他技术讨论专区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧