【发布时间】:2010-11-25 12:46:03
【问题描述】:
我正在尝试使用头文件<iostream.h> 将屏幕保留在我的输出上,但我不知道<iostream.h> 中<conio.h> 的getch() 和clrscr() 函数的任何等效函数或任何其他 C++ 库。有这样的功能吗?
【问题讨论】:
-
在 C++ 中,标头只是
#include <iostream>,不是#include <iostream.h> -
<iostream>可能是标准但clrscr()不是标准,因此在非标准标头中找到它实际上是有意义的。 -
其实我一直想问,为什么有些人总是先用 clrscr() 开始一个程序,然后用 getch() 结束。
-
相关帖子 - getch is deprecated