-1
이것이 바보 같은 질문이 아니길 바랍니다. stdin을 FILE로 리디렉션 할 수 있습니까?stdin을 pipe (popen)로 리디렉션 C++
FILE* somePipe = _popen("SOME_FILE", "r");
somePipe를 stdin에 할당 할 수 있습니까? freopen()
를 사용
이것이 바보 같은 질문이 아니길 바랍니다. stdin을 FILE로 리디렉션 할 수 있습니까?stdin을 pipe (popen)로 리디렉션 C++
FILE* somePipe = _popen("SOME_FILE", "r");
somePipe를 stdin에 할당 할 수 있습니까? freopen()
를 사용
시도 :
FILE* somePipe = freopen("SOME_FILE", "r", stdin);
FILE* inPipe freopen("newstdin", "r", stdin);
FILE* outPipe freopen("newstdout", "w", stdout);
당신이'freopen' 봤어? – Hurkyl
중복 가능 : http://stackoverflow.com/questions/584868/rerouting-stdin-and-stdout-from-c – vulkanino