freopen用法

#include <bits/stdc++.h>
using namespace std;
int main()
{
    freopen("1.in","r",stdin);
    freopen("1.out","w",stdout);
    int n;
    scanf("%d",&n);
    printf("%d\n",n);
    fclose(stdin);//关闭重定向输入 
    fclose(stdout);//关闭重定向输出 
    return 0;
}
全部评论

相关推荐

自学java狠狠赚一...:骗你点star的,港卵公司,记得把star收回去
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务