r/programminghelp • u/bigDissapointment12 • Feb 20 '24
C Weird string issue
Hey, I'm experiencing this weird issue with my code. I'm still fairly beginner, but I need to make a project for one of my University classes. I decided to make a "hangman" like game. It works fairly well except for the one issue that when the user inputs a letter to guess, no matter what it will always output "Incorrect guess" for the first letter. I'm not exactly sure why, I've tried figuring it out for a few hours now but I just cant crack it.
Any help is appreciated, thanks!
1
Upvotes
View all comments
Show parent comment
2
u/bigDissapointment12 Feb 20 '24
I just tried it myself, I see it worked there. I am using Cygwin to compile and run my code, as well at NP++ as the IDE. I am not sure why it would work on that online compiler, but not mine. I also tried using Code::Blocks and I ran into the same issue with Cygwin. Maybe I have to change some compiler settings?