Read hole file with fread
#1

Is there any stock to read a hole file with fread?

Thanks
Reply
#2

Bumper !
Reply
#3

fread actually reads the whole file, it's just a li'l complicated.

You're most probably using:
pawn Код:
array = fread(file, io_read);
They way it's correctly done:

pawn Код:
while(fread(file, io_read))
{
  //Code
}
A good idea of how it actually works can easily be found when looking into the SeifAdmin system, though I'm unsure if there's still a link around. Other then that, you could try looking it up in the dini.inc, but I wouldn't recommend that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)