Define with or statement

Hello,

I'm new to C++ and am trying to figure out some of the language.. I'm attempting to make it so if I have 3 different buttons on an IR remote that they correspond to a single case statement. I know I can have 3 separate ones set up like: Case 1: Case 2: Case 3: for an or statement, but is there a way when I define the case name corresponding to the hex number from the remote they can be in an or statement? I was trying it like:

#define case1 0xFF42BD || 0xFF4AB5 || 0xFF52AD

That didn't work, is it even possible to have an or like this?

Thank you!

is it even possible to have an or like this?

It is possible to define a text string that contains an OR operand like that. It is NOT possible to define a case statement that uses an OR operator.

If you want a code block to be activated when the switch variable is 0xFF42BD or 0xFF4AB5 or 0xFF52AD then you can do it like this

case 0xFF42BD:
case 0xFF4AB5:
case 0xFF52AD:
//code for the cases goes here
break;
0xFF42BD || 0xFF4AB5 || 0xFF52AD

All those values are non-zero, so what you've done is effectively

true