C++对文件的输入输出

来源:互联网 发布:软件架构画图工具 编辑:程序博客网 时间:2024/05/08 07:15
#include<fstream>using namespace std;ifstream fin("aplusb.in");ofstream fout("aplusb.out");int main(){    int a,b;    while(fin >> a >> b) fout<< a+b << "\n" ;    return 0;}

原创粉丝点击