I just recently started learning C++, in the book i am learning from there is a problem that asks you to write a simple pasword program. It just asks the user the password and then displays a message wether its right or wrong after they enter it. I am having a lot of trouble declaring the right variable type, the password is kevin so i declared kevin as a char and the letter "x" as a char to and said:
cin >> x;
if (x==kevin){
cout<< "Correct"
else
cout<<"Incorrect"
}
could anyone help me out?