L
lavu
I am trying to use filestreams (ifstream / ofstream) to copy
a text file line by line except except the last few lines that meet
certain conditions.
Each line is of variable length.
With the line length unknown, I used a fixed byte length buffer of 255
characters that I
copy over using getline(). However this removes the newline at the end
of the line and copies over
whatever value I have intialized the receving buffer.
what would be a clean way to copy over a line including a newline from
one file to another ?
Any help is appreciated.
a text file line by line except except the last few lines that meet
certain conditions.
Each line is of variable length.
With the line length unknown, I used a fixed byte length buffer of 255
characters that I
copy over using getline(). However this removes the newline at the end
of the line and copies over
whatever value I have intialized the receving buffer.
what would be a clean way to copy over a line including a newline from
one file to another ?
Any help is appreciated.