Comparing chars to strings

I am currently working on a simple hangman program and I need to be able to compare the letter guessed to the letters in the word. For simplicity lets just say the letter guessed is 'o' and the string that it is being compared to is "programming"

how do I compare the two so that the program knows the guess is correct?
Iterate over the string and check each character.
I have not done that before. How do I do that?
What code would I need to use to go about checking the string for the given char?
Topic archived. No new replies allowed.