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 had used that, i will display the character i enter.....

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

example:

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

PS:go through this thread

[url]http://www.daniweb.com/forums/thread9916.html[/url]

has a better detailed solution....

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

example:

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

PS:go through this thread

[url]http://www.daniweb.com/forums/thread9916.html[/url]

has a better detailed solution....

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

thanks guys for ur gr8 support.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.