As Dave said, printf() is better solution.
printf("\nCopying...\n");
while (!feof(inFp)) {
inChar = getc(inFp);
printf("\nThe %i item of file1 : <%02X>\n",i, inChar);
putc(inChar, outFp);
printf("The %i item of file2 : <%02X>\n",i, inChar);*/
i++;
}
But the problem exists. If you trace the chars with this source code, by making file1 empty, you will see, by copying to file2, that there is an <FFFF> Try it!
|