My question is what operator should i use in my loops to tell if the char is in the string variable
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
string password;
password = "red";
char letter;
cout << "Plaese pick a letter" << endl;
cin >> letter;
if(letter ?? password)
{
cout << "Correct letter" << endl;
}
else if(letter ?? password)
{
cout << "Wrong letter" << endl;
}
|
Last edited on
Thanks guys for the help. Got it!