eof() is there a better way
From: Satan (NoSpam_at_)
Date: 03/31/04
- Next message: Sumit Rajan: "Re: eof() is there a better way"
- Previous message: Jkramer: "Re: Dynamic Array dereference problem"
- Next in thread: Sumit Rajan: "Re: eof() is there a better way"
- Reply: Sumit Rajan: "Re: eof() is there a better way"
- Reply: Blake Kaplan: "Re: eof() is there a better way"
- Reply: Chris \( Val \): "Re: eof() is there a better way"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 30 Mar 2004 17:49:56 -0800
Hi,
I am always having trouble with the following:
while ( !read_file.eof()){
// do something
}
Looping again when i think the file should be empty.
It even loops when i have created a new file with
nothing in it (editor - vi).
Is there a better way to ensure you are at EOF ?
Thanks
- Next message: Sumit Rajan: "Re: eof() is there a better way"
- Previous message: Jkramer: "Re: Dynamic Array dereference problem"
- Next in thread: Sumit Rajan: "Re: eof() is there a better way"
- Reply: Sumit Rajan: "Re: eof() is there a better way"
- Reply: Blake Kaplan: "Re: eof() is there a better way"
- Reply: Chris \( Val \): "Re: eof() is there a better way"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|