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

#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 );
    }
}

posted @ 2008-11-20 19:47  雨城  阅读(796)  评论(3编辑  收藏  举报