469,347 Members | 5,117 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,347 developers. It's quick & easy.

Need Help output repeating last line

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
Dec 13 '06 #1
1 1731
DeMan
1,806 1GB
how are you outputting the file you read?
Dec 14 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Tom Lam lemontea | last post: by
17 posts views Thread by EkteGjetost | last post: by
2 posts views Thread by nickheppleston | last post: by
3 posts views Thread by seven.reeds | last post: by
7 posts views Thread by fox | last post: by
7 posts views Thread by Gasten | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.