【发布时间】:2011-10-27 16:36:54
【问题描述】:
请参阅下面的评论。
int main(){
//freopen("input.txt","r",stdin);//if I uncomment this line the console will appear and disappear immediately
int x;
cin>>x;
cout<<x<<endl;
system("pause");
return 0;
}
如何让它发挥作用?
【问题讨论】:
-
更重要的是,你为什么用
system("pause")? -
我正在使用这个功能,因为我想看到程序输出。
标签: c++ console system console-application freopen