uhm.... excuse me but can you please help me? i'm having trouble with making password in TURBO c.... the condition goes like this, while the user is entering a password, the user will not see alpha-numeric characters instead, he/ she can see only asterisk... and the computer will read the password.
if the password is 'liza' it will clear the screen and it will loading...if it`s not it will print 'failed to log-in'
can you please tell me the code?????
my only problem is how to asign password and the computer or the program will read the password
To remove the charater echo in the terminal you need to do some special hocus-pocus. Under Linux(and most Unices I would guess) youcan use the termios API to manipulate the terminal I/O. I've written a short example:
hxslacker ur code is working but can u please give me soe tips or codes that can asign the password as 'liza' and when i click 'delete' or 'space' its shown as asterisk too
You have to check for and respond to specific characters to get different responses.
The following example was written for Win32 API, but you should be able to see how it checks for and responds to 'delete' ('\b') differently than other characters: http://www.cplusplus.com/forum/general/3570/page1.html#msg15410
Good luck!
do i nid to print this>>>(\b') we are using TURBO C...almost of the codes was not acceptable
my only problem now is =>codes that can asign the password as 'liza' and when i click 'delete' or 'space' its shown as asterisk too<=
i know now how to change the input into asterisk* but i dont knw how to asign a password
in to 'liza'
i dont know if i nid yo use string compare and string copy..
do i nid??