【发布时间】:2013-04-07 17:37:44
【问题描述】:
当我在 Dev C++ 中编译并运行以下代码时,
#include <stdio.h>
main()
{
printf("Hello world!");
}
输出只是闪烁。当我添加getch 时,它会保留。
#include <stdio.h>
main()
{
printf("Hello world!");
getch();
}
为什么会这样?
【问题讨论】:
-
你知道
getch是做什么的吗? -
它从用户那里获取输入。不是吗?
-
你知道答案了吧?