主题:为什么我用TC写的程序运行时会突然关闭?
为什么我用tc写的程序编译后运行,才刚运行不到一秒就退出了?
例如程序:
main()
{
printf("hello");
}
这样写很快就关闭了的!
要在后面加个getch()
main()
{
printf("hello!");
getch();
}
才不会退出
这是怎么回事啊?我在书上看的教程是不用getch()的啊?
例如程序:
main()
{
printf("hello");
}
这样写很快就关闭了的!
要在后面加个getch()
main()
{
printf("hello!");
getch();
}
才不会退出
这是怎么回事啊?我在书上看的教程是不用getch()的啊?