C
Christopher
I recently ran into a bug that I was not expecting at all (well, I
guess you never do)
I am using fstream:::getline, which asked for a buffer of type char *.
I made my buffer size 255 thinking I was safe. When I went to parse a
file that contained an extremely long line, my program parsed the data
incorrectly, but kept going!
How can I check whether or not the entire line was obtained?
What is a better way to ensure I always get the entire line? Isn't
there some way to replace getline and the static sized buffer with
something that will grow as large as needed?
guess you never do)
I am using fstream:::getline, which asked for a buffer of type char *.
I made my buffer size 255 thinking I was safe. When I went to parse a
file that contained an extremely long line, my program parsed the data
incorrectly, but kept going!
How can I check whether or not the entire line was obtained?
What is a better way to ensure I always get the entire line? Isn't
there some way to replace getline and the static sized buffer with
something that will grow as large as needed?