C言語なら俺に聞け(入門篇) Part 6
レス数が950を超えています。1000を超えると書き込みができなくなります。
0982デフォルトの名無しさん
2007/01/27(土) 20:58:38ありがとうございます。
しかし、fflush(stdin)を全部入れ替えたら新たな問題が。
#include<stdio.h>
#include <string.h>
#include <conio.h>
main(){
int check=0;
char word[8]="string\n",input[8];
while(check == 0){
// fflush(stdin);
while(kbhit()){
getch();
}
fgets(input, 8, stdin);
if (strcmp(word,input) == 0){
printf("OK\n");
check = 1;
}else{
printf("NG\n");
}
}
return 0;
}
レス数が950を超えています。1000を超えると書き込みができなくなります。