c++文件流输入输出

  1 #include <iostream>
  2 #include <fstream>
  3 using namespace std;
  4 
  5 
  6 ifstream fin("sum.in");//填入文件的地址
  7 ofstream fout("sum.out");
  8 
  9 int main() {
 10 	int a, b;
 11 	fin >> a >> b;
 12 	fout << a + b << endl;
 13 	return (0);
 14 
s算法比赛经常用到,而且不用手动输入数据,真香。
posted @ 2020-06-01 09:54  ACWink  阅读(242)  评论(0编辑  收藏  举报