944,181 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 3395
  • C++ RSS
Nov 24th, 2004
0

hiding

Expand Post »
can some please tell how can u hide whatever u are typing when typing in c++ exe. file?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Tresa is offline Offline
14 posts
since Nov 2004
Nov 24th, 2004
0

Re: hiding

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.
Reputation Points: 7
Solved Threads: 1
Junior Poster in Training
harshchandra is offline Offline
68 posts
since Nov 2004
Nov 25th, 2004
0

Re: hiding

Quote originally posted by harshchandra ...
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Tresa is offline Offline
14 posts
since Nov 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Quick Fix plz
Next Thread in C++ Forum Timeline: hi friends pls help me out





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC