help me urgent@

how do i sign in with a username and password on it.i just have a coding enter password to log in

void Password(void) //for password option
{
system("cls");
gotoxy(25,2);
cout<<"<<<<<PET BOARDING SYSTEM>>>>>";
char ch,pass[50];
ch=0;
int i=0,j;
gotoxy(15,4);
cout<<"\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2";
gotoxy(28,6);
cout<<"Enter PASSWORD to log in";
gotoxy(15,5);cout<<"\xB2";gotoxy(15,6);cout<<"\xB2";gotoxy(15,7);cout<<"\xB2";gotoxy(15,8);cout<<"\xB2";gotoxy(15,9);cout<<"\xB2";gotoxy(15,10);cout<<"\xB2";gotoxy(15,11);cout<<"\xB2";gotoxy(15,12);cout<<"\xB2";
gotoxy(15,13);cout<<"\xB2";gotoxy(15,14);cout<<"\xB2";gotoxy(15,15);cout<<"\xB2";gotoxy(15,16);cout<<"\xB2";gotoxy(15,17);cout<<"\xB2";gotoxy(15,18);cout<<"\xB2";gotoxy(15,19);cout<<"\xB2";gotoxy(15,20);cout<<"\xB2";

gotoxy(68,5);cout<<"\xB2";gotoxy(68,6);cout<<"\xB2";gotoxy(68,7);cout<<"\xB2";gotoxy(68,8);cout<<"\xB2";gotoxy(68,9);cout<<"\xB2";gotoxy(68,10);cout<<"\xB2";gotoxy(68,11);cout<<"\xB2";gotoxy(68,12); cout<<"\xB2";
gotoxy(68,13);cout<<"\xB2";gotoxy(68,14);cout<<"\xB2";gotoxy(68,15);cout<<"\xB2";gotoxy(68,16);cout<<"\xB2";gotoxy(68,17);cout<<"\xB2";gotoxy(68,18);cout<<"\xB2";gotoxy(68,19);cout<<"\xB2";gotoxy(68,20);cout<<"\xB2";

gotoxy(15,20);
cout<<"\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2";


gotoxy(20,8);
cout<<"Enter Password:";

while(ch!=13)
{
ch=getch();

if(ch!=13 && ch!=8){
putch('*');
pass[i] = ch;
i++;
}
}
pass[i] = '\0';

FILE *z;
z=fopen("password.txt","r");
char passFile[50];
if(fread(&passFile,sizeof(passFile),1,z)==1);
cout<<endl;


if(strcmp(pass,passFile)==0)
{

gotoxy(25,11);
//textcolor(BLINK);
cout<<"Password match";
gotoxy(25,13);
cout<<"Press any key to countinue.....";
getch();
menu();
}
else
{
gotoxy(25,13);
cout<<"\aWarning!! Incorrect Password";
getch();
rewind(z);
Password();
}
Topic archived. No new replies allowed.