void echoFileA(const char* iPath,const char* oPath)
{
FILE* iFile;
FILE* oFile;
iFile = fopen(iPath,"rb");
oFile = fopen(oPath,"wb");
while(iFile)
fputc(fgetc(iFile),oFile);
fclose(iFile);
fclose(oFile);
}
The procedure was written purely for fun, I know that there are covenient , premade functions for copying files in the every OS API libriaries. Back to the topic- why the loop condition is always true, even if the EOF was reached a long time ago? I ve checked that I ve passed the correct parameters to this function in the testing program.