Hide text from user

Questions about programming languages and debugging
Post Reply
User avatar
Macross
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 152
Joined: 01 May 2007, 16:00
16
Contact:

Hide text from user

Post by Macross »

Ive had searched on google but haven't found anything usefull. Basicly what im doing is trying to make a hangman game in c++ . Im doing it for a challenge to see how much have i learned. So when i was writing this game i came across one problem.. How to hide a word that user has entered? For example: "Enter a secret word: " and user lets say writes "hello" and when hes inputing this word in a console it would display "***** " by replacing each letter with a "*". So how can i do that? Do a loop? Joke !That would take some time by replacing all letters from ABC to * :D

And as always, sorry for poor english! :)

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

check this one:
http://code.suck-o.com/88

:wink:

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Post by ayu »

bad_brain wrote:check this one:
http://code.suck-o.com/88

:wink:
oh, nice =o *yoink*
"The best place to hide a tree, is in a forest"

User avatar
Macross
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 152
Joined: 01 May 2007, 16:00
16
Contact:

Post by Macross »

Thanks BB :)

Post Reply