This program is to accept input from a user to select there own username and then a password which will be compared to the password KazzyB, and give an output saying Welcome, The only problem in it is a single error KB.cpp(18) : error C2447: missing function header (old-style formal list?)
#include <iostream.h>
#include <string.h>
class Password
{
char user[6], pass[6], username[6], passwrd[6], KazzyB;
public:
Password(void);
void user(void);
void set(void);
};
Password::user(void)
{
cout<<"Enter username"<<endl;
cin>>user;
cout<<"enter password:"<<endl;
cin>>pass;
}
void Password::set(void);
{
if (pass = KazzyB)
{
cout<<"user"<<endl;
cout<<"Welcome"<<endl;
}
else if (pass != KazzyB)
{
cout<<"user"<<endl;
cout<<"Enter passwrd again"<<endl;
cin>>pass;
}
else if (pass != KazzyB)
{
cout<<"user"<<endl;
cout<<"Good bye"<<endl;
exit;
}
}
void main()
{
Password y;
y.user();
y.set();
}