Think of typing a password. You type your password but what you see is merely a asterisk sign. If you use getch()
, no problem! Put the problem is that I can't use the getch. See the code:
struct Func {
char password[9];
char name[34];
char code[8];
}element;
do{
gotoxy(21,6);
printf("****************************************");
gotoxy(21,7);
printf("**Password: *******");
gotoxy(21,8);
printf("****************************************");
gotoxy(46,7);
cin>>element.password;
}while(strlen(element.password)<4||strlen(element.password)>8);
fich.write((char *)&element,sizeof(Func));
fich.close();
Can some please tell how can i hide the password, in this case? :cry: