First of all, don't laugh because I'm using Delphi...it's not my choice.
I have to rewrite a c program in delphi and I'm having trouble dealing with binary files.
Here is my c code:
Code:
FILE:*fp,*fp1;
int:i,j;
fp=fopen(binfile,"rb");
while (!feof(f2))
{
fp1=fopen(temp,"wb");
for(i=0;i<100000;i++)
{
ch=fgetc(fp);
if(feof(fp))
{
break;
}
fputc(ch,fp1);
}
fclose(fp1);
do something with temp
}
This is used to break up large files and upload to our websit.
I need to do the same thing but only in Delphi.