摘要: freopen()——重定向标准输入输出流 头文件:stdio.h 函数原型:FILE * freopen(const char *filename , const char *type , FILE *stream); 例:freopen(“in.txt”,”r”,stdin);freopen(“out.txt”,”w”,stdout); 参数说明: filename: 文件名,用于存储输入输出的自定义文件名。例:"debug\\in.txt" ,可以是路径。 type: 文件打开的模式。和fopen中的模式(如r-只读, w-写)相同。 stream: ... 阅读全文
posted @ 2013-08-04 13:26 Freecode# 阅读(3859) 评论(0) 推荐(0)