当我编译程序时,出现错误信息“QIODevice::write:设备未打开”,这个程序在我的旧电脑上可以运行,但是在新电脑上却不能正常工作。请问如何解决此错误?感谢您的帮助。
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();