i want to put a newline into a txt file, i tried with many alternative with so many help from this forum but i am getting always unknown character always. Please help
for (int i = 0; i < fileDet.size(); i++) {
qDebug() << "Name directory" << fileDet.at(i);
QFile data("output.txt");
if (data.open(QFile::Append)) {
QTextStream out(&data);
out << fileDet.at(i); //<<'\n';
out << QChar((int)'\n');
}
data.close();
}
Try out << endl;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With