passing operator as a parameter
I want to have a function that evaluates 2 char vars (like a truth table)
T | F : T
should return true;
myfunc('t', 'f', ||); /*defined as: bool myfunc(char lv, char rv, ????)*/
how can I pass the third parameter? (I know is possible to pass it as a char* but then I will have to have another table to compare operator string and then do the operation which is something I would like to avoid)
Is it possible to pass an operator like ^(XOR) or ||(OR) or &&(AND), etc in a function/method?
Thanks in advance