gets(),get(),getc(),getch(),getchar()这几个函数有啥区别?
我在学字符串处理函数,经常被上面这几个函数搞糊涂掉。哪位大虾能指点使用这几个函数的技巧?
2005-09-15 09:22
2005-10-17 12:24
2005-10-19 19:42
2005-10-21 12:11
| getchar,getch | ||
|

2005-10-21 22:14
getchar,getch
原型:extern int getchar(void); 用法:#include <ctype.h> 功能:读键 说明:从键盘上读取一个键,并返回该键的键值 getch是到getchar的宏定义 举例: // getchar.c #include <stdio.h> main() { int c; clrscr(); printf("Press key..."); while((c=getchar())!='Q') { clrscr(); printf("key: %c\nvalue: %x",c,c); } }

2005-10-21 22:18
2005-10-21 22:20






2005-10-21 22:31