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();