Thread: multiple end of file sequence

  1. #1
    Unregistered
    Guest

    multiple end of file sequence

    i'm reading a really big file roughly 33M of data about 1.5 million lines. and my program crashes about half way through the loop. apparently it's found an end of file character about half way through the file. is there a way to continue reading beyond the end of file? i've tried to read more lines but i just keep getting the same line.

  2. #2
    Registered User
    Join Date
    Feb 2002
    Posts
    589
    How do you know it is a end of line character?

  3. #3
    Registered User C_Coder's Avatar
    Join Date
    Oct 2001
    Posts
    522
    the end of the file is what is says.
    Maybe your file is corrupted.
    All spelling mistakes, syntatical errors and stupid comments are intentional.

  4. #4
    Unregistered
    Guest
    i know it is an end of file character because the loop only terminates on an end of file

    i.e.

    it goes

    ifstream filein

    while(!filein.eof()) {
    ...
    }

    and i've physically serched the file. it is only about 1/2 way through.

  5. #5
    Unregistered
    Guest
    what are you doing with the material you are reading in? Maybe you are overloading the stack memory for the program.

  6. #6
    Unregistered
    Guest
    Other files of the same size were read w/o a problem. The program loops through the large file looking for target lines and pulls in the info after them for a given number of lines. This premature end of file problem only occurs in a single file so far.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem building Quake source
    By Silvercord in forum Game Programming
    Replies: 16
    Last Post: 07-11-2010, 09:13 AM
  2. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 09:35 AM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  4. Encryption program
    By zeiffelz in forum C Programming
    Replies: 1
    Last Post: 06-15-2005, 03:39 AM
  5. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM