2015年4月9日 星期四

C語言 - 清空stdin

不能使用fflush(),無效。
要使用
int c;
while((c = getchar()) != '\n' && c != EOF);

沒有留言: