词条 | _getwch |
释义 | 函数简介函数原型:wint_t _getwch( void ); 函数功能:类似于getch() 所属库: Routine Required header Compatibility _getch <conio.h> Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 _getwch <conio.h> or <wchar.h> Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 相关函数: Tchar.h routine _UNICODE and _MBCS not defined _MBCS defined _UNICODE defined _gettch _getch _getch _getwch 备注:wint_t说明见于stdio.h typedef unsigned short wchar_t; typedef wchar_t wint_t; 由此可见wint_t即unsigned short 程序示例#include <conio.h> #include <ctype.h> int 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( '\' ); // Line feed } |
随便看 |
百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。