Hi!
I am want to compare two values. First value is an input from user. which i stored in object variable. Second value is predefined. When i try to compare it. Compiler generate a error saying "ISO c++ forbid comparison between pointer and integer value".
How can i solve it?
Code:
class pass{
private:
char in[10]; // To store command
int rawpass; // To store value
public:
void inp();
char dec();
};
void pass::inp()
{
cout<<"Type 'help' for Help"<<endl;
cin>>in;
cin.ignore('\r');
}
char pass::dec()
{
if(in=='help')
{
cout<<"generate";
cout<<": This command is used to generate a random password";
cout<<endl<<"encrypt";
cout<<": This command is used to encrypt a password";
cout<<endl<<"decrypt: This command is used to decrypt a password";
cout<<endl<<"intro: This command is used to provide a brife introduction about software";
cout<<endl<<"trouble: This command is used for trouble shooting";
cout<<endl<<"credit: This command is used to display information abot the develpor";
cin>>in;
}