摘要:
一直在找这个问题,今天终于在MSDN上面找到了答案,实现代码如下/* ISATTY.C: This program checks to see whether * stdout has been redirected to a file. */#include #include void main( void ){ if( _isatty( _fileno( stdout ) ) ) printf( "stdout has not been redirected to a file\n" ); else printf( "stdout has been redir 阅读全文