i want add * in project protection function
i want to replace b with star.
void passch()
{ char pass[11],a[11],b[11],c[11],ch;
cout%26lt;%26lt;"\n withen change \n";
getch();
fstream passfile;
passfile.open("pass",ios::in | ios::out | ios::binary);
%26lt;%26lt;"\n\n\t\t Enter password : ";
gets(pass);
passfile.seekg(0,ios::beg);
while(!passfile.read((char*)%26amp;a,sizeo...
cout%26lt;%26lt;"\n old pass "%26lt;%26lt;pass%26lt;%26lt;"\n in the file "%26lt;%26lt;a;
if(strcmp(pass,a)==0)
{ clrscr();
bg();
org();
cout%26lt;%26lt;"\t\t\t\t -CHANGE PASSWORD-";
cout%26lt;%26lt;"\n\n\t\t Enter new password"
%26lt;%26lt;" (10 char max.) : ";
gets(b);
cout%26lt;%26lt;"\n\n\t\t Confirm (Re-enter) new password : ";
gets(c);
if(strcmp(b,c)==0)
{ passfile.seekp(0,ios::beg);
passfile.write((char*)%26amp;c,sizeof(c)...
cout%26lt;%26lt;"\n\n\t\t PASSWORD HAS BEEN"
%26lt;%26lt;" UPDATED...\n\n"; }else
{ cout%26lt;%26lt;"\n\n\t\t Sorry, the password could";
cout%26lt;%26lt;" not be confirmed...";}}else
{ cout%26lt;%26lt;"\n\
Can any one here to tell .how i can add star (*)in c++ in password program?
You can use gets() and puts() functions
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment