M
Moikel
Hi,
I've decided to write a little archiving program (something similar to
a simple winZip) and I need a way to determine the number of bytes in a
file. I'm using getc() to read chars from the file and I have a little
loop that looks something like this:
while(p = getc(file_pointer) != eof)
{
num_bytes++;
}
Now, this works fine for text files, but I tried to use this on a .wmv
video, and got a completely crazy answer. I'm guessing that the end of
these files are not designated by an eof character....
Now, what do I have to do to determine in the number of bytes in a file
of any file type?
Thanks
I've decided to write a little archiving program (something similar to
a simple winZip) and I need a way to determine the number of bytes in a
file. I'm using getc() to read chars from the file and I have a little
loop that looks something like this:
while(p = getc(file_pointer) != eof)
{
num_bytes++;
}
Now, this works fine for text files, but I tried to use this on a .wmv
video, and got a completely crazy answer. I'm guessing that the end of
these files are not designated by an eof character....
Now, what do I have to do to determine in the number of bytes in a file
of any file type?
Thanks