multiple end of file sequence

This is a discussion on multiple end of file sequence within the C++ Programming forums, part of the General Programming Boards category; i'm reading a really big file roughly 33M of data about 1.5 million lines. and my program crashes about half ...

  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
    591
    How do you know it is a end of line character?

  3. #3
    Registered User C_Coder's Avatar
    Join Date
    Oct 2001
    Posts
    523
    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, 10: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, 07:39 AM
  4. Encryption program
    By zeiffelz in forum C Programming
    Replies: 1
    Last Post: 06-15-2005, 04:39 AM
  5. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 10:54 AM

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