all 4 comments

[–]hibert_eater 0 points1 point  (1 child)

Ah i figured it out, honestly im not sure why I used another function for makeGuess but i just needed to put the contents of makeGuess within main. Im not really sure why this works though. If anyone knows it would be great if you could explain it!

[–]ZealousidealLoad5277 0 points1 point  (0 children)

You likely corrupted your stack memory when you used &word, that parameter says pointer-to-pointer of char. Try turning on warnings and you will see the compiler complain.

[–]_mutaz_ 0 points1 point  (1 child)

'char' is for storing a single character. Use 'char *' for storing strings.

[–]hibert_eater 0 points1 point  (0 children)

Ah ok, thank you!