#include<iostream>#include<fstream>using namespace std;void main(){ int a; int c; ifstream in ("abc.txt"); in>>a; in.close(); in.clear(); ofstream file("abc.txt", ios::out | ios::app); file<<5; //输入一个数如5 file.close(); file.clear(); in.open("abc.txt"); in>>c; in.close(); in.clear(); cout<<a<<endl; cout<<c<<endl;}