如题,请给出程序代码,谢谢!马上结帖!

解决方案 »

  1.   

    #include <conio.h>
    #include <ctype.h>void main( void )
    {
       int ch;   _cputs( "Type 'Y' when finished typing keys: " );
       do
       {
          ch = _getch();
          ch = toupper( ch );
       } while( ch != 'Y' );   _putch( ch );
       _putch( '\r' );    /* Carriage return */
       _putch( '\n' );    /* Line feed       */
    }
      

  2.   

    呵呵,是使用汇编写的,汇编可以直接与键盘中断打交道,所以实现getch()易如反掌。
      

  3.   

    再请问一下,在VxWorks中是如何实现getch()函数的,对解决该问题的哥们将另开一百分!
      

  4.   

    CRT目录下有getch.c,里边的_getch有源码