0

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:

Edited by pyTony: fixed formating

3
Contributors
2
Replies
3
Views
12 Years
Discussion Span
Last Post by Narue
0

>the problem is that I can't use the getch.
Then you have to write a routine with equivalent functionality. There's no standard way to do what you want.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.