I have coded this Hangman prog as a school project, however I am experiencing a small problem. The program prints a number of *s for every random word that is chosen. For instance, the word "oasis" would be *****. Yet, when printing the *s, it gives the last letter of the word a "null" value, in other words the array's last space is empty. For instance once again: oasis is now ****null...
And for some reason, if you type in the correct letter for the first letter of the word (in oasis "o"), it simply doesn't print it.
Well, we're all volunteers here so there's never a guarantee that a question will be answered in a specific amount of time. That said, I took a quick glance at your code and decided that I didn't want to wade through all of it looking a problem that's probably pretty isolated. I'd recommend that you send us a smaller bit of code that isolates the problem you're having, and you'll probably get a faster response. Also, you might find that when you isolate the bit of code that's causing you grief, you might just find the problem yourself!
Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Be reasonable. You can't destroy everything. Where would you sit? How would you read a tiny ad?
Free, earth friendly heat - from the CodeRanch trailboss