//
#include <stdio.h>
int main () {
FILE *fp;
printf("This text is redirected to stdout/n");
fp = freopen("file.txt", "w+", stdout);
printf("This text is redirected to file.txt/n");
fclose(fp);
return(0);
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/265218.html