Sorry for my English, and code. I'm just studying both.
Problem is with text wraping by words. I mean single word in single line.
We have file with text (for example: in data.txt is written "I do not have smth.") I need to write it to rez.txt every word in new line. I cannot find nessesary operator. Please, teach me. Compiler is DEV C++ 4.9.9.2. Thanx a lot.
Hi, I too started to learn File I/O and I think what you should do is just make a string variable in which you'll store the new text. Read the first text in a different string variable and make a while loop or some other and go through each index element of string. Add those elements (characters) to that final string variable and if your current element is a space just add \n sign to your final string.
Also, I think there is a string function called replace or something. I don't know. After you finish with your final string variable just output it to your file rez.txt! Hope this helps! :)
you can store the words from 'data.txt' in a string using the >> operator, then write that word and a newline character ( or what makes a new line on your computer ) using the << operator