i have an enum.
Example:
enum events
{
MOVE_UP = 0,
MOVE_DOWN,
MOVE_RIGHT,
MOVE_LEFT,
};
i want to pass particular enum value as function arguments. for example:
my method definition is
- (void) invokeEvents:(enum events)events withMessage:(NSDictionary*)message;
while calling this method i am passing arguments like:
[self invokeEvents:MOVE_UP|MOVE_DOWN|MOVE_RIGHT withMessage:message;
while checking the received parameter events is value is always last value of list of MOVE_UP|MOVE_DOWN|MOVE_RIGHT values. MOVE_RIGHT 2 as per enum value.
but i want all the values like "MOVE_UP|MOVE_DOWN|MOVE_RIGHT" equal 0, 1 and 2. how can i pass the parameter so that i can get all values.
kindly give suggestion for my problem.
Thanks in advance.