Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
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
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:19 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC