Hi

I m reading a file that ends with a blank line and when i do the output it repeats the line before the blank 2 times.

I am using


ifstream infile;

infile.open ("FICHEIROS_DE_ENTRADA.TXT", ifstream::in);

while (infile.peek() != '0' && !infile.eof()){

infile>>i;

To read the input...
Can anyone help me not to repeat the last line?

Thank's
Ricardo