void play_Hangman (void) {
int misses = 7;
int i;
int len;
int new_Round = 0;
int round_Count = 1;
char choice;
char *search;
char* word = generate_Word();
len = strlen(word);
printf ("%s\n", word);
for (i = 0; i < len; i++) {
printf ("_ ");
}
while (new_Round == 0) {
printf ("\nRound: %d", round_Count);
printf ("\n%d misses remain\n", misses);
noose_Display (misses);
printf ("\nGuess a letter: ");
scanf ("%c", &choice);//************** THIS IS BEING SKIPPED ****************
search = strchr (word, choice);
while (search != NULL) {
printf ("\nfound at %d\n", search - word + 1);
search = strchr (search + 1, choice);
}
round_Count++;
}
return 0;
}
Interestingly enough, it will only skip it the first time and then the scanf function becomes available on the second loop. I am so confused...

New Topic/Question
Reply




MultiQuote






|