c++2008简单的printf不显示,高手支招下

来源:百度知道 编辑:UC知道 时间:2024/05/31 23:04:00
求教
运行窗口一闪就关闭了,没有留下holle的字符,源程序在下面
#include <stdio.h>
int main(void)
{
printf("holle\n");

return 0;
}
可是用C++6.0就没问题的源程序呀,是2008不好用吗?改动很大?

改为如下形式:

#include <stdio.h>

int main(void)
{
printf("holle\n");
getchar();/*起暂停作用*/
return 0;
}

或者

#include <stdio.h>
#include <stdlib.h>
int main(void)
{
printf("holle\n");
system("pause");/*起暂停作用*/
return 0;
}

要不,按楼上说的暂停,要不,就按alt+F5或者ctrl+F5试试。

ctrl+F5就有了

我的不是啊!

cin.get(); getchar(); system("pause") 断点等

哈哈,菜单栏上有个"Debug" 选择Start Without Debugging就是那个空心的三角形,不是实心的。你可以调整图标把那个图标放在上面。