Results 1 to 2 of 2
i am creating a text-based hangaroo game in C..can somebody help me on this?. i have to store the answer on my program.then compare whatever the user will input but ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 09-18-2008 #1
- Join Date
- Sep 2008
c program using perhaps array..
i am creating a text-based hangaroo game in C..can somebody help me on this?.
i have to store the answer on my program.then compare whatever the user will input but for every correct letter i have to display the blanks plus the correct letters. what will i use? is that really possible with array?
any suggestion even one which will not use array is highly appreciated
- 09-19-2008 #2
There are many different solutions to this problem. I would suggest creating an array of chars to represent your string and an equally-long array of ints to represent an on/off switch for each char in the other array.
But if you're trying to learn C, I don't want to just give you the answer. See if you can figure it out with that clue. =) Let me know what you get.
Also, while I'm happy to see that you're learning C, I hope this isn't some sort of homework problem. If it is, you shouldn't be posting it. Please check the Forum Rules.
But otherwise, let me know how far you get!