For loop exersise

Hey Jorgen!
I see you’re declaring your variables outside the function. That will work since you’re saying “Hey, I want the whooole code to see this!”, and that’s cool under certain circumstances, but that is not very good right now since we’re trying to keep variables near where they’re used so the code is clear, and we want them to be discarted after it’s no longer needed. Try moving your variables inside the functions that use it. You expect, for exemple, the variable used inside the loop to be near the loop, inside main, also the other functions don’t need that variable, there’s no reason to announce to all of them like that.

Thanks Gabriel! I see what you’re saying about global vars… Rookie mistake :). I’m converting ‘bulls and cows’ to ‘hugs and kisses’, my wife’s my beta tester and she likes that better. She also asked for letter position feed back to make it more like ‘wheel of fortune’. She’s guessing 8 letter isograms in about 15 tries (she’s WAY better at this game than me :). Thanks again for the feed back. Capture -JN

Privacy & Terms