c++ - After reading a file, and (with append function) puting it into a file again, a lot of '\n' 's appear -
c++ - After reading a file, and (with append function) puting it into a file again, a lot of '\n' 's appear -
basically, loadup text files, , set them text file, when outputing, when should this:
nuskaityti krepsininku duomenys: komanda vardas pavarde gimimo m. ugis pozicija taskai klaidos
kom1 var1 pav1 1985 189 gynejas 10 5 kom2 var2 pav2 1955 159 vidurys 7 2 kom3 var3 pav3 1999 162 gynejas 5 5 kom2 var4 pav4 1956 157 puolejas 5 3 kom1 var5 pav5 1986 185 gynejas 10 4 kom5 var6 pav6 1959 165 vidurys 21 3 kom3 var7 pav7 1992 192 puolejas 5 4
looks this
nuskaityti krepsininku duomenys:
(\n(not in code, showing purpose))
komanda vardas pavarde gimimo m. ugis pozicija taskai klaidos
kom1 var1 pav1 1985 189 gynejas 10 5
kom2 var2 pav2 1955 159 vidurys 7 2
kom3 var3 pav3 1999 162 gynejas 5 5
kom2 var4 pav4 1956 157 puolejas 5 3
kom1 var5 pav5 1986 185 gynejas 10 4
kom5 var6 pav6 1959 165 vidurys 21 3
kom3 var7 pav7 1992 192 puolejas 5 4
i utilize move info txt files
ofstream fout("abc.txt", fstream::app); string^ str = "r3b.txt"; streamreader ^strm = gcnew streamreader(str); string ^st1=strm->readtoend(); strm->close(); string st1 = marshal_as<string,string ^>(st1); richtextbox1->text+=st1; fout << st1; fout.close();
i'm thinking takes every new line text file , reads every \n cannot think of way prepare this
so, if understand correctly, there blank beingness inserted between each line. if that's case, i'm guessing you're using windows, , windows stores newlines \r\n
beingness set 2 newlines, hence blank line.
c++ text
Comments
Post a Comment