954,173 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

hiding

can some please tell how can u hide whatever u are typing when typing in c++ exe. file?

Tresa
Newbie Poster
14 posts since Nov 2004
Reputation Points: 10
Solved Threads: 0
 

I didn't get ur point exactly........
However in c++ u can use getch(); .This will defenately take the character from the user but will not display over stdout.
For example : Think of typing a password.U type ur password but wht u see is merely a asterisk sign.Following code explains it better.
int k =5
do
{ character=getch(); /* These thing is done so that password is not visible*/
gotoxy(k,8) ;printf("*");
str8[i]=character;
k++;
i++;
}while(character != '.');
i--;
str8[i]='\0';
This will keep on entering a string to that array str8[] and will not display the original characters entered but instead of that will display a "*" till users presses a dot.
Instead of dot u can use any sentinel value as if ASCII charater of return key is 13.

harshchandra
Junior Poster in Training
68 posts since Nov 2004
Reputation Points: 7
Solved Threads: 1
 
I didn't get ur point exactly........ However in c++ u can use getch(); .This will defenately take the character from the user but will not display over stdout. For example : Think of typing a password.U type ur password but wht u see is merely a asterisk sign.Following code explains it better. int k =5 do { character=getch(); /* These thing is done so that password is not visible*/ gotoxy(k,8) ;printf("*"); str8[i]=character; k++; i++; }while(character != '.'); i--; str8[i]='\0'; This will keep on entering a string to that array str8[] and will not display the original characters entered but instead of that will display a "*" till users presses a dot. Instead of dot u can use any sentinel value as if ASCII charater of return key is 13.

]


thanks

Tresa
Newbie Poster
14 posts since Nov 2004
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You