文件输入输出

#define LOCAL
#include <iostream>
#include <string>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <stack>
using namespace std;

#define mem(a,b) memset(a,b,sizeof(a))
#define pf printf
#define sf scanf
#define debug printf("!\n")
#define INF 10000
#define MAX(a,b) a>b?a:b
#define blank pf("\n")
#define LL long long

#ifdef LOCAL
     freopen("data.in","r",stdin);
     freopen("data.out","w",stdin);
#endif // LOCAL

重定向

 

int main()
{
     File *fin,*fout;
     fin = fopen("data.in","rb");
     fout = fopen("data.out","wb");
     int m;
     fsf("%d",&m);
     fpf("%d\n",m);
     fclose(fin);
     fclose(fout);
     return 0;
}

标准

 

posted @ 2016-01-27 22:32  qlky  阅读(157)  评论(0编辑  收藏  举报