I was checking the first letter of the response with the letters ‘y’ and ‘Y’ and had this doubt.
When i type this way I always end up getting up false even if the input entered is “yes”.
if (Response[0] == ('y' || 'Y'))
cout << "true";
else
cout << "false";
But when I frame it this way I get the correct output. Can someone please explain what is going on here. Thanks.
if (Response[0] == 'y' || Response[0] == 'Y')
cout << "true";
else
cout << "false";