您的位置:首页 > 编程语言 > C语言/C++

c++200例子之096---谁能帮我看看是什么东西

2008-11-20 19:47 561 查看
#include <stdio.h>

void main( void )

{

int c;

/* Create an error by writing to standard input. */

putc( 'A', stdin );

if( ferror( stdin ) )

{

perror( "Write error" );

clearerr( stdin );

}

/* See if read causes an error. */

printf( "Will input cause an error? " );

c = getc( stdin );

if( ferror( stdin ) )

{

perror( "Read error" );

clearerr( stdin );

}

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: