EOF Explanation Anybody?

This is a discussion on EOF Explanation Anybody? within the C Programming forums, part of the General Programming Boards category; Hello, I don't quite understand the constant, EOF. In php I work with opening and reading external(non-program) files such as ...

  1. #1
    Registered User
    Join Date
    Jan 2008
    Posts
    19

    EOF Explanation Anybody?

    Hello,
    I don't quite understand the constant, EOF. In php I work with opening and reading external(non-program) files such as csv or txt, and I use EOF as end of that file.

    Does EOF in C mean EOF of the program, and if so, is this like reading the file from top to bottom? I have a small program that basically goes into loop waiting for user input and it tests :
    Code:
    while(something != EOF){
    
    Blah blah
    
    }
    Anybody shed some light?
    Im new to C by the way.

  2. #2
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. EOF or not EOF?
    By CornedBee in forum Linux Programming
    Replies: 2
    Last Post: 09-14-2007, 02:25 PM
  2. EOF messing up my input stream?
    By Decrypt in forum C++ Programming
    Replies: 4
    Last Post: 09-30-2005, 03:00 PM
  3. whats the deal with EOF really ???
    By gemini_shooter in forum C Programming
    Replies: 7
    Last Post: 03-06-2005, 03:04 PM
  4. fclose() and EOF
    By Micko in forum C Programming
    Replies: 3
    Last Post: 09-16-2004, 12:53 PM
  5. files won't stop being read!!!
    By jverkoey in forum C++ Programming
    Replies: 15
    Last Post: 04-10-2003, 05:28 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21