This seems like a bit of a computing systems 101 question, but I\'m stumped.
I am integrating existing code from C/C++ project A into my own project B. Both A and B
You can use freopen to change the descriptor.
#include
main(int argc, char** argv) {
FILE *fp = freopen("output.txt", "w", stdout);
printf("Hello\n");
fclose(fp);
}
If you run that you'll see the printf output in output.txt and nothing will go to your screen.
You can now open the file to read the data or you could even mmap it into your memory space and process it that way.