Click here to Skip to main content
15,919,931 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: password Echo Pin
22491729-Apr-05 0:48
22491729-Apr-05 0:48 
GeneralRe: password Echo Pin
ThatsAlok29-Apr-05 0:54
ThatsAlok29-Apr-05 0:54 
GeneralRe: password Echo Pin
toxcct29-Apr-05 1:01
toxcct29-Apr-05 1:01 
GeneralRe: password Echo Pin
ThatsAlok29-Apr-05 1:19
ThatsAlok29-Apr-05 1:19 
GeneralRe: password Echo Pin
toxcct29-Apr-05 1:25
toxcct29-Apr-05 1:25 
GeneralRe: password Echo Pin
ThatsAlok29-Apr-05 1:34
ThatsAlok29-Apr-05 1:34 
GeneralRe: password Echo Pin
Anonymous29-Apr-05 1:06
Anonymous29-Apr-05 1:06 
Generalpassword Echoz Pin
namaskaaram29-Apr-05 3:49
namaskaaram29-Apr-05 3:49 
aaah.....;)....i dunno if u have found out an answer.....if u havent ...try thiz out.....


#include<iostream.h>
#include<conio.h>


void main(void)
{
char passw[50];
char ch;
int i;

clrscr();

cout<<"Enter the password: \n";

i=0;
while( (ch=getch())!=13 )//keep doing thiz loop till enter key iz prezzed
{

if(ch==8)//if the character entered is backspace
{

if(i>0)//if there is more than zero characterz!
{
i-=1;//reduce the value,in short remove the character!!!!!
cout<<(char)ch;//display the backspace character!!!!!to remove the existing star
cout<<" ";//actually if i am right,the backspace char just movez one step the left,so u have to display thiz space char  
cout<<(char)ch;//and again display the backspace char to move one step back to the left
}//end of if(i>0)

}//end of if(ch==8)
else//if not a backspace
{
cout<<"*";//display the astrix!!!!!
passw[i]=ch;
i+=1;//increment the character count
}//end of else(ch==8)

}//end of while(ch==13)


//not yet complete.....add the null identifier character to teh end of the password,or else teh whole array of 50 elementz will be taken as teh string!!!!!

passw[i]=NULL;


cout<<"\n\n\n\n\n";
cout<<passw;//verify ur answer here.....i havent tried it out wholly!!!!!
getch();
}



hope thiz helpz.....;)

cheerz.....Big Grin | :-D





"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
GeneralRe: password Echoz Pin
Anonymous2-May-05 15:14
Anonymous2-May-05 15:14 
GeneralRe: password Echoz Pin
namaskaaram9-May-05 3:34
namaskaaram9-May-05 3:34 
GeneralEvent after ShowWindow() Pin
tysh29-Apr-05 0:23
tysh29-Apr-05 0:23 
GeneralRe: Event after ShowWindow() Pin
ThatsAlok29-Apr-05 0:36
ThatsAlok29-Apr-05 0:36 
GeneralRe: Event after ShowWindow() Pin
stolid_rock29-Apr-05 0:38
stolid_rock29-Apr-05 0:38 
GeneralRe: Event after ShowWindow() Pin
Michael Dunn29-Apr-05 6:34
sitebuilderMichael Dunn29-Apr-05 6:34 
GeneralRe: Event after ShowWindow() Pin
tysh3-May-05 22:09
tysh3-May-05 22:09 
GeneralSerial VXD Pin
Neha.marwaha28-Apr-05 23:57
Neha.marwaha28-Apr-05 23:57 
GeneralRe: Serial VXD Pin
Alexander M.,29-Apr-05 9:20
Alexander M.,29-Apr-05 9:20 
GeneralDebug my MFC app. Pin
anderslundsgard28-Apr-05 23:41
anderslundsgard28-Apr-05 23:41 
GeneralRe: Debug my MFC app. Pin
BambooMoon29-Apr-05 4:59
BambooMoon29-Apr-05 4:59 
GeneralRe: Debug my MFC app. Pin
anderslundsgard30-Apr-05 22:53
anderslundsgard30-Apr-05 22:53 
GeneralShellExecuteEx problem Pin
kittunair28-Apr-05 23:28
kittunair28-Apr-05 23:28 
GeneralRe: ShellExecuteEx problem Pin
Jack Puppy29-Apr-05 0:29
Jack Puppy29-Apr-05 0:29 
Generalchar * to const char * Pin
microsoftcertificate28-Apr-05 23:26
sussmicrosoftcertificate28-Apr-05 23:26 
GeneralRe: char * to const char * Pin
CP Visitor28-Apr-05 23:31
CP Visitor28-Apr-05 23:31 
GeneralRe: char * to const char * Pin
microsoftcertificate29-Apr-05 0:18
sussmicrosoftcertificate29-Apr-05 0:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.