Thread: help needed with file I/O

  1. #16
    Registered User
    Join Date
    Apr 2003
    Posts
    2,663
    I am not yet sure why the next line is not being read
    ...because of your while conditional:
    Code:
    while (!getline (myfile,line))
    That says continue looping as long as the read fails. Since your read is a success, the loop terminates.

  2. #17
    Registered User
    Join Date
    Sep 2005
    Posts
    14
    That did it... I dunno what i was thinking.. thanks a lot to everybody...

  3. #18
    Registered User
    Join Date
    Jan 2005
    Posts
    7,359
    I did not notice that when I suggested you use it earlier. Sorry about that.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File I/O Assertion Failure in VS2008
    By clegs in forum C Programming
    Replies: 5
    Last Post: 12-25-2008, 03:47 AM
  2. Simple File encryption
    By caroundw5h in forum C Programming
    Replies: 2
    Last Post: 10-13-2004, 10:51 PM
  3. 2 questions surrounding an I/O file
    By Guti14 in forum C Programming
    Replies: 2
    Last Post: 08-30-2004, 11:21 PM
  4. advice on file i/o
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 11-29-2001, 04:56 AM