V
Vijay
Hi.
I have a binary file which is on a CD it has filesize around
300 MB. Its not a text file. I want to read it and copy its
content to a new file on hard disk. I dont want to use
filecopy. I want to open it and read its content and copy to
the file which is created on the harddisk. How can I do this.
fgets will require specifica no allocated to buffer.
Please check my logic . please dont mind syntax or improper function names.
I tried with.
fp1 = fopen (file on cd in 'r')
fp2 = fopen (create a file on HDD in 'w' mode)
while(!feof(fp1))
{
int ch = fgetch(fp1);
write to fp2;
}
fclose(fp1) fclose(fp2)
but i found that in the middle it gets out. it doesnt read the file fully.
is there any other way which is more convenient.
I dont know the format in which data is stored.
thanks
vijay
I have a binary file which is on a CD it has filesize around
300 MB. Its not a text file. I want to read it and copy its
content to a new file on hard disk. I dont want to use
filecopy. I want to open it and read its content and copy to
the file which is created on the harddisk. How can I do this.
fgets will require specifica no allocated to buffer.
Please check my logic . please dont mind syntax or improper function names.
I tried with.
fp1 = fopen (file on cd in 'r')
fp2 = fopen (create a file on HDD in 'w' mode)
while(!feof(fp1))
{
int ch = fgetch(fp1);
write to fp2;
}
fclose(fp1) fclose(fp2)
but i found that in the middle it gets out. it doesnt read the file fully.
is there any other way which is more convenient.
I dont know the format in which data is stored.
thanks
vijay