C++的暂停

在CSDN论坛上看到了这个问题,可惜我不是会员,所以无法回答,如何解决呢?有五种方法: 方法一: #include int main() { system("pause"); return 0; } 方法二: #include int main() { getchar();//须按回车键结束,不是任意键 return 0; } 方法三: #include int main() { getch(); return 0; } 方法四: #include int main() { while(!kbhit()); return 0; } 方法五: 在reture 0;处设中断。 如果你还有其它方法请留言,谢谢!

你可能感兴趣的:(C++)