那位大哥告诉我C++的暂停问题 我用c++生成了控制台应用程序后 ,打开就关了,不能暂停,总是纳闷,希望解决掉这个问题。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 getchar(); / system("pause"); 方法一:#include <stdlib.h>int main(){system("pause");return 0;}方法二:#include <stdio.h>int main(){getchar();//须按回车键结束,不是任意键return 0;}方法三:#include <conio.h>int main(){getch();return 0;}方法四:#include <conio.h>int main(){while(!kbhit());return 0;}方法五:在reture 0;处设中断。 system("pause");或者设置个输入,让dos等待输入就行只有在vc中调试的时候才会有“按任意键结束” [vfw] capVideoStreamCallback回调函数的第二个参数LPVIDEOHDR lpVHdr为空? 求解 把图片保存为MPG格式? 怎样根据出错的地址(如:0x00401082)找到出错的代码行? 我的 VC6 出问题了,求救 没人知道吗?还是我说的不清楚?如何得到sqlserver中DateTime类型字段精确到毫秒的值? 求 导数 怎么用c++语言写? 请问CList应该如何声明? 多文档界面问题? 按钮发送SendMessage失效怎么办? 如何将我的一个线程映射到别的程序的地址空间里? 关于预编译头文件StdAfx.h的问题 vc+ado事务例子,有的贴一下代码
方法一:
#include <stdlib.h>
int main()
{
system("pause");
return 0;
}方法二:
#include <stdio.h>
int main()
{
getchar();//须按回车键结束,不是任意键
return 0;
}方法三:
#include <conio.h>
int main()
{
getch();
return 0;
}方法四:
#include <conio.h>
int main()
{
while(!kbhit());
return 0;
}
方法五:
在reture 0;处设中断。
或者设置个输入,让dos等待输入就行
只有在vc中调试的时候才会有“按任意键结束”