-
password programming
i got proble in coverting the password to '*' style at the same time that user are key in it. so if they anybody can help me in this case?what should i do? please reply me at [email protected]. tq
#include<iostream>
#include<string>
using namespace std;
class password
{
private:
string name,pw;
public:
void pass()
{
cout<<"\nEnter New userid"<<endl;
cin>>name;
cout<<"Enter New password"<<endl;
cin>>pw;
cout<<"\b";
compare(name,pw);
}
void compare(string nm,string kk)
{
string nama,ps;
cout<<"\n\nEnter userid"<<endl;
cin>>nama;
cout<<"Enter password"<<endl;
cin>>ps;
if(nm==nama && kk==ps)
cout<<"correct"<<endl;
else
cout<<"incorrect"<<endl;
}
}
main()
{
password pa;
char ans,answ;
cout<<"DO you want to login? Y/N"<<endl;
cin>>ans;
while(ans=='Y' || ans=='y')
{
cout<<"\n\nAre you the new user? Y/N"<<endl;
cin>>answ;
if(answ=='Y' || answ=='y')
pa.pass();
else if(answ=='N' || answ=='n')
{
cout<<"\n\nSystem already delete your userid and password"<<endl;
cout<<"You need to register again. Thak you\n\n"<<endl;
pa.pass();
}
else
cout<<"system refuse"<<endl;
cout<<"\n\nDO you want to try again? Y/N"<<endl;
cin>>ans;
}
cout<<"\t\t\t\tTHANK YOU TO TRY THE SECURITY SYSTEM"<<endl;
}
-
AGHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!1
:mad: :mad: :mad:
doesnt anyone read that ****ing faq!
or site rules!!!
the amount of streesing that has occured recently you think people would have more sense!
Search the board - know there are loads of posts on this subject and you will find a solution virtually instantly
as for emailing it to you - i dont think so !
come back and find it yourself