Hi, Greg Wooledge wrote: > This is what's causing the loop to iterate more times than it should, > and to re-process input.
That's not what i see in my experiments. I see stuttering output which first repeats the lines put out so far before it adds a new line. The getline() loop iterates as often as there are input lines. The fact that you report input woes matches tom kronmiller's reported remedy of setvbuf(stdin, NULL, _IONBF, 0). So maybe i see something completely different than both of you. Will make more experiments. Have a nice day :) Thomas