Thread: cannot get out of while( !feof (f) )

  1. #1
    Registered User
    Join Date
    Feb 2005
    Posts
    30

    cannot get out of while( !feof (f) )

    Hi all,

    i am using while(!feof (f)) to read from a file. i have in1.txt written in vim and in2.txt written in notepad. however, i can get out of the while loop when i am using in1.txt, but cannot when using in2.txt...

    why does this happen? is there any way to get out of the while loop when using in2.txt?

    anyone can enlighten me?

    Thank you so much..

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Read the FAQ.

    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Registered User
    Join Date
    Feb 2005
    Posts
    30
    Thanks..

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. feof issues
    By Rare177 in forum C Programming
    Replies: 13
    Last Post: 11-23-2004, 10:11 AM
  2. feof()
    By XSquared in forum C Programming
    Replies: 2
    Last Post: 06-02-2004, 12:16 AM
  3. feof ....EOF
    By GanglyLamb in forum C Programming
    Replies: 12
    Last Post: 12-04-2002, 12:38 PM
  4. advice on feof()
    By Hobo in forum C Programming
    Replies: 2
    Last Post: 09-07-2002, 08:15 AM
  5. Is !feof supposed to work?
    By SMurf in forum C Programming
    Replies: 2
    Last Post: 08-29-2001, 12:44 PM