VS2010/2008 C++ program error:output window disappears 运行窗口自动退出
来源:互联网 发布:消防联动编程 编辑:程序博客网 时间:2024/06/18 18:38
在visul studio 2010和2008里面运行如下c++程序:
#include <iostream>
using namespace std;
int main()
{
int a, b, c;
int f(int x, int y, int z);
cin>>a>>b>>c;
c=f(a,b,c);
cout<<c<<endl;
return 0;
}
int f(int x, int y, int z)
{
int m;
if(x<y) m=x;
else m=y;
if(z<m) m=z;
return m;
}
会出现如下内容且窗口自动退出:
'521.exe': Loaded 'D:\Program Files\521\Debug\521.exe', Symbols loaded.
'521.exe': Loaded 'C:\Windows\System32\ntdll.dll', Cannot find or open the PDB file
'521.exe': Loaded 'C:\Windows\System32\kernel32.dll', Cannot find or open the PDB file
'521.exe': Loaded 'C:\Windows\System32\KernelBase.dll', Cannot find or open the PDB file
'521.exe': Loaded 'C:\Windows\System32\msvcp100d.dll', Symbols loaded.
'521.exe': Loaded 'C:\Windows\System32\msvcr100d.dll', Symbols loaded.
The program '[5960] 521.exe: Native' has exited with code 0 (0x0).
需要加 system(“pause”)
原因:system( "pause ")就是表示接收一个输入,比如显示的 按任意键继续...
修改后程序为:
#include <iostream>
using namespace std;
int main()
{
int a, b, c;
int f(int x, int y, int z);
cin>>a>>b>>c;
c=f(a,b,c);
cout<<c<<endl;
system("pause");
return 0;
}
int f(int x, int y, int z)
{
int m;
if(x<y) m=x;
else m=y;
if(z<m) m=z;
return m;
}
- VS2010/2008 C++ program error:output window disappears 运行窗口自动退出
- VS2010中运行C++程序,dos窗口自动关闭解决方法
- 进程异常退出 EIO input/output error
- window.onload的页面自动加载详解,onUnload退出当前窗口加载函数
- C 的exe文件运行完成后自动退出
- VS2010. Error MSB6006: “CL.exe”已退出
- 关于vs2010运行C程序时,运行结果窗口一闪而过的问题
- 关于vs2010运行C程序时,运行结果窗口一闪而过的问题
- 关于vs2010运行C程序时,运行结果窗口一闪而过的问题
- VS2010输出标准信息(stdout)到output窗口
- window output
- VS2010 Error : Unable to start program Access is denied
- runtime error program c:/WINDOWS/Explorer.EXE
- 在vs2010中,新建C语言程序,运行时DOS窗口一闪而过看不到结果,解决方法整理
- 在vs2010中,新建C语言程序,运行时DOS窗口一闪而过看不到结果,解决方法整理
- [C#]Unity调用window窗口
- 在运行java程序时出现 Error: could not open c:\program Files\Java\jre6\lib\amd64\jvm.cfg'
- 在运行java程序时出现 Error: could not open c:\program Files\Java\jre6\lib\amd64\jvm.cfg'
- 03_Activity 生命周期介绍【图解】
- 将String保存成文件
- SSH简介
- j2se小节
- CSS pitfalls and how to overcome them
- VS2010/2008 C++ program error:output window disappears 运行窗口自动退出
- “display:block-inline形式的Span或Div中添加文字后,导致Span或Div排版掉落、错位”的原因及解决方法
- 字符串的倒序输出
- ubuntu eclipse安装
- NAND Flash的驱动程序设计
- web config 详细
- B-树 实现
- 蓝色妖姬玫瑰的js实现
- 如何使用ASP.NET母版页统一网页标题