I hope that this is not a stupid question. Is it possible to redirect stdin to a FILE?
FILE* somePipe = _popen("SOME_FILE", "r");
Can I assign somePipe to stdin?
I hope that this is not a stupid question. Is it possible to redirect stdin to a FILE?
FILE* somePipe = _popen("SOME_FILE", "r");
Can I assign somePipe to stdin?
Try using freopen()
:
FILE* somePipe = freopen("SOME_FILE", "r", stdin);
FILE* inPipe freopen("newstdin", "r", stdin);
FILE* outPipe freopen("newstdout", "w", stdout);