dongju.jeong Posted May 25, 2020 Share Posted May 25, 2020 file_5 = File::create("aaa.txt", "w+"); for (int i = 0; i < num; i++) { file_5->writeString("abcd\n"); } //file_5->flush(); file_5->close(); A strange string is added. Why is this happening? Is it related to this? Link to comment
morbid Posted May 26, 2020 Share Posted May 26, 2020 Hello, Is there any specific reason for writeString? Why not just use write? WriteString is supposed to write binary data that is being read with readString, no human-readable text should be there. More likely by coincidence you've got a code for a dash. Thanks. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Amerio.Stephane Posted May 26, 2020 Share Posted May 26, 2020 I agree, the name writeString() here is a bit misleading. Something like read/writeBinaryData would be more clear. Link to comment
dongju.jeong Posted May 27, 2020 Author Share Posted May 27, 2020 (edited) thank you. I use the write() function instead of writeString(). Edited May 27, 2020 by dongju.jeong Link to comment
morbid Posted May 27, 2020 Share Posted May 27, 2020 We'll try to change method name to something more obvious. Thank you for the feedback. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts