When I have to deal with big inputs I usually deal with it reading in a buffer the data:
[c]numread=fread(buffer, sizeof(char), MAXBUF, stdin);[/c]
or:
[c]numread=read(0, buffer, MAXBUF);[/c]
What are the differences between these two?
On my system it looks like read doesn't try to fill the whole buffer, but only gets as far as the first newline
Does this have to do with some settings of the input stream? May I rely on this behaviour?
Is there a way to explicitly enable/disable it?
Thanks in advance for any suggestion!
Ciao!!!
Claudio
