【发布时间】:2010-10-19 17:21:16
【问题描述】:
void clearscreen ( void )
{
char a = 'a' ;
fflush ( stdout );
do{
a = getc( stdin ) ;
if ( isspace ( (int ) a ) )
{
getc ( stdin );
}
}while ( a != EOF );
}
我 想要编写能够清洁屏幕的功能,在完成它的工作时必须清除所有字符,尤其是空白 字符。 但是我写不出来,有没有人可以帮我写一个这样的函数
【问题讨论】:
-
请正确格式化您的代码!使用编辑器中的“1010”按钮。
-
您的代码中有一个反引号 (`)。另外,你的问题是什么?
-
在终端上擦除空白字符是什么意思?
标签: c terminal whitespace