Thread: Textfiles/EOF

  1. #1
    Registered User
    Join Date
    Aug 2004
    Posts
    4

    Textfiles/EOF

    Please forgive my lack of knowledge of C, i am using a tutorial at Howstuffworks.com to see if i want to devote more time to learning it. On the current "lesson" they have me enter the attatched program, compile and run it. the prog. is supposed to allow the user to enter text and then signal eof by pressing CTRL-D. however, this does nothing except put the symbol for that on the screen. can anyone help me with this? basically i think what i need is to know the end of file signal for windows xp.

    thanks.
    Last edited by navyzack; 08-27-2004 at 01:31 AM.

  2. #2
    Registered User
    Join Date
    Aug 2004
    Posts
    4

    Nvm

    I searched the forum and found my answer.

  3. #3
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >I searched the forum and found my answer.
    Fancy that.
    My best code is written with the delete key.

  4. #4
    Registered User
    Join Date
    Mar 2004
    Posts
    38
    please share with us the answer u got

  5. #5
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >please share with us the answer u got
    Ctrl+D is the EOF signal for POSIX systems, on Windows you use Ctrl+Z. Strangely enough, you could have acquired that information the same way that the OP did.
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed