I want to copy data from one stream to another. Now I usually do this:
n = fread(buffer, 1, bufsize, fin); fwrite(buffer, 1, n, fout);
Is there a way to write data directly from fin to fout without going through the buffer, i.e. instead of fin->buffer->fout , I want to directly do fin->fout (no buffer).
Can this be done in ANSI C? If not, is it possible to do this using POSIX functions? Or a solution for Linux?
c linux stream posix
Robby75
source share