VS2008中,运行win32控制台程序,怎么输出的DOS窗口会自动消失?
#include <iostream>
using namespace std;
void main()
{
cout<<"please"<<endl;
}
弹出的DOS窗口,迅速自动消失。
为什么不像VC6.0那样提示“Press any key to continue”?总得让我有时间看看输出信息吧。
[解决办法]
#include <iostream>
using namespace std;
void main()
{
cout<<"please"<<endl;
system("pause");//
}