Help with hangman

Jul 11, 2014 at 8:18pm
I have an array with the letters of the word that the user is attempting to guess, after I ask the user to input their guess, how can I have my program scan for every char in the array and return a value when it finds it?
Jul 11, 2014 at 9:50pm
Use a for loop.

1
2
3
for ( int i = 0; i < [array size]; ++i )
    // check if array[i] == letter
        // if it does, return something 
Last edited on Jul 11, 2014 at 9:51pm
Topic archived. No new replies allowed.