Thread: EOF not found

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Sep 2002
    Posts
    2

    EOF not found

    Hi, I wrote a simple program based on the file io tutorial. It 's supposed to echo a file but unfortunatel it dosent seam to hit the EOF?

    Code:
    int main(void){
    
    ifstream in("my_file");
    
    char input;
    
    in.get(input);
    while(input != EOF){
    cout << input;
    in.get(input);
    }
    
    in.close();
    
    return 1;
    }
    Any help is appreciated.
    Last edited by bif22; 09-29-2002 at 08:19 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Symbol file not found for *.ko
    By yanglei_fage in forum Linux Programming
    Replies: 3
    Last Post: 03-30-2009, 08:48 AM
  2. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  3. doesn't stop before EOF
    By zmaker5 in forum C Programming
    Replies: 15
    Last Post: 08-03-2007, 02:25 PM
  4. Check for EOF when using fgets
    By daghenningsorbo in forum C Programming
    Replies: 6
    Last Post: 05-16-2007, 06:48 PM
  5. fscanf and EOF
    By .ZG. in forum C Programming
    Replies: 3
    Last Post: 05-30-2004, 07:49 AM