Hi all!
I have a client-server application and the network settings are loaded from a txt file that can be overwritten by the administrator but I am have some problems writing the textstream to the file.
the txt file looks like this:
this is the function to write:Quote:
192.168.1.220
11001
Code:
return; out << ui.lineEdit_16->text() << "\n" << ui.lineEdit_17->text() << endl;
the open and reading part works perfectly but when I write with that function, sometime it writes the first line and then the second, other times writes a blank line in the middle, then 2 blank lines, and maybe then back to normal...
I tried other ways:
Code:
out << ui.lineEdit_16->text() << "\n" << ui.lineEdit_17->text();
Code:
out << ui.lineEdit_16->text() << "\n" out << ui.lineEdit_17->text();
Code:
out << ui.lineEdit_16->text(); out << ui.lineEdit_17->text();
Code:
out << ui.lineEdit_16->text() + out << ui.lineEdit_17->text();
Code:
out << ui.lineEdit_16->text() << "\n" << ui.lineEdit_16->text();
they all give me the same problem and my co-worker has a program that does the same thing and it works well for him.
thanks in advance