While entering the password and id in the program ,i want the program should not display any of those entered characters.
While enter the password it should show the astericks for eg.
By using Scanf,it is not possible..

By using getpass() function it just doesn't display any thing on the screen.
So please give me a clue for it !!!!

I'm not quite sure...
If u're using bc5 this might works. but if u're using microsoft visual studio, as long as I know, this won't work

use getch() for character inputting one by one. this function is included in conio.h. then manipulate it using \b and *.

but still, I'm not sure this will work if u're pressing backspace when the program runs.

i think u might use the getch() putch combination
use getch to enter the charcter one by one and then using putch print out *


getch(password[x]);  //where x runs in a loop from 0 till NULL

PS:go through this thread


has a better detailed solution....

This will work -- but only if you are using a compiler that defines getch() properly. Most don't.

This article has been dead for over six months. Start a new discussion instead.