I don't believe I know how to use a buffer, I haven't programmed in a year so I'm pretty rusty. Is a dynamic array just a pointer of some sort?
Originally posted by Prelude
This sounds like a nightmare, you have my sympathy.
Try using a buffer and a dynamic array. Read one word up to the newline, get it's length and increase your dynamic array by that much, concatenate the buffer to the end of it and then assign your pointer to the resized array. If you can offer more information as to what you plan on doing with the input once you have it, and the estimated size of the input that would help me in thinking of another solution.