A
Anderson
Hi,all
I use the following code to read 10000 bytes from a file(fp1) and write
them to another file(fp2).
char *pStr = new char[10001];
fread(pStr,dw_size,1,fp1);
int i = 0;
while(i<10000)
{
fwrite(pStr,1,1,fp2);
pStr++;
}
I found only 1682 bytes was written to fp2!
Could any body tell me why?
Thanks in advance!
Anderson
I use the following code to read 10000 bytes from a file(fp1) and write
them to another file(fp2).
char *pStr = new char[10001];
fread(pStr,dw_size,1,fp1);
int i = 0;
while(i<10000)
{
fwrite(pStr,1,1,fp2);
pStr++;
}
I found only 1682 bytes was written to fp2!
Could any body tell me why?
Thanks in advance!
Anderson