ifstream 和 ofstream
怕忘了 存一下
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
ifstream inf1("1.txt");
inf1 >> a;
ifstream inf2("2.txt");
inf2 >> b;
ofstream ouf("output.txt");
ouf << a + b;
return 0;
}
怕忘了 存一下
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
ifstream inf1("1.txt");
inf1 >> a;
ifstream inf2("2.txt");
inf2 >> b;
ofstream ouf("output.txt");
ouf << a + b;
return 0;
}