rt,在关闭输入输出流同步后再使用文件输入输出会出现问题。
例如:
#include<bits/stdc++.h> using namespace std; int n; int main() { ios::sync_with_stdio(false); freopen("cai.in","r",stdin); freopen("cai.out","w",stdout); cin>>n; cout<<n*2; return 0; }
这种情况应该怎么解决?