|
|
char words[a_lot][MAX_WORD_LEN]; then you get a random word by doing strcpy(word, words[rand()%number_of_words]);.
|
|
|
|
|
|
hangmand[count].hangman++, since its a local variable. But what about the rest. I thought that u can change the memory pointed to by pointer by using hangman="..".| cire: hangman is a local variable yes, but it is a pointer. |
| My idea is to make the pointer point to the hangman array, depending on how many guesses (count) the user has made. |
| I thought that u can change the memory pointed to by pointer by using hangman="..". |
*hangman = or hangman[index] =. But doing hangman = modifies the pointer itself.| Would u be able to use C code when writing code? I do not understand c++. |
printf( "%s", figure[i]); and you've got a purely C version.Guess(a-z): _______ And then when i guess, everything works fine, except the next time it prints Guess(a-z): _______ It prints it twice before i have the chance to guess. Guess(a-z): _______ h (h is my guess)Guess(a-z): h______ Guess(a-z): h______: |
|
|
|
| right now im having a problem with the compile printing too many times. |
|
|
scanf(" %c", &g);, which skips all leading whitespace when reading.| Another problem i have is that the hangman figure prints like this: |
"/ | \\" translates to / | \ |
|
|
|
|
|
|
|
return 0;, but still.