Shirlies
宁静专注认真的程序媛~

留给自己看看,我的博客,我的成长……

#include "fstream"
//#define fin cin
//#define fout cout
using namespace std;

//改成标准输入输出时可以注释掉下面两行,将上面注释的两行注释符号侧掉
ifstream fin("data.in");
ofstream fout("data.out");

int main()
{
 int a,b;
 while(fin>>a>>b)
  fout<<a+b<<endl;
 return 0;
}

还要注意头文件哈,那个“fstream”,改为标准输入输出时也要改过来的。

posted on 2012-01-04 21:26  Shirlies  阅读(222)  评论(0编辑  收藏  举报