当我编译我的程序时,我得到错误信息"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();发布于 2015-01-29 02:40:22
问题是我在一个不存在于这台计算机上的地方创建了文件,更改了创建文件夹的位置,然后就修复了它。
https://stackoverflow.com/questions/28199532
复制相似问题