I'm wondering if there is a short way to compare one Char to many Chars. In my code I read a Key for Yes or No [Y/N] then i will check if the Char is 'Y' Or 'N'.
This is the Long Way:
if(myChar == 'n' || myChar == 'y')
{
....
It tried(didn't work):
if(myChar == ('n'|'y'))
{
.....
Can someone help?