+-
c – 文件打开时“QIODevice :: write:device not open”
当我编译我的程序时,我得到错误消息“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();
最佳答案
问题是我在这台计算机上不存在的地方创建文件更改了创建文件夹的位置并修复了它.
点击查看更多相关文章

转载注明原文:c – 文件打开时“QIODevice :: write:device not open” - 乐贴网