Friday, October 14, 2005

Re: File size restriction using Bloodshed C++

xunzi81@gmail.com wrote:
> I can't understand......

Given the code fragment...

while (!infile.eof()) {

perform whatever tasks...

}

perform the next task

The while loop wouldn't be broken after the end of file of infile was
encountered. That is, 'perform the next task' was never done. The
program just stalled at the bottom or top bracket. The problem was
solved by inserting a symbol into the data that indicated the end of
the data file with the loop break contingent on encountering this
symbol. The file size confusion occured because there was processed
data trapped between the brackets when the program stalled. It
appeared as if there was a maximum allowable file size permitted.

0 Comments:

Post a Comment

<< Home