标签:c style class blog code java
1 #include <unistd.h> 2 #include <stdio.h> 3 4 FILE* Freopen(const char *fileName, const char *type, FILE *stream){ 5 FILE *fileFp = fopen(fileName, type); 6 int fd1 = fileno(fileFp); 7 int fd2 = fileno(stream); 8 if(dup2(fd1, fd2) < 0) return NULL; 9 else return stream; 10 }
标签:c style class blog code java
原文地址:http://www.cnblogs.com/aclove/p/3774398.html