View Single Post
Old May 22nd, 2006, 3:04 AM   #1
tumbleTetris
Programmer
 
Join Date: May 2006
Posts: 39
Rep Power: 0 tumbleTetris is on a distinguished road
Creating two lists of correct and incorrect letters.

I'm making a 'guess the word' program.

The idea is a user presses a key on the keyboard and if the letter was in the word it gets stored in a list of all the letters that have been guessed right, otherwise its stored in alist of all the incorrect guesses.

I'm trying to do it with arrays, I'm initializing two array's with 26 indices (bit of overkill but better safe than sorry), and the idea is if the user inputs a correct letter its input in one array and vise versa. However lets say if the first guess was correct, I store the letter in position x of the array, and print it, the array prints 25 blanks after it. Can this be averted?
tumbleTetris is offline   Reply With Quote