S
shsingh
I have a function which takes two operands (char*) and a operator
(char*)
int myFunc(char* operand1, char* operand2, char* myoperator);
Depending upon the operator, i want to do the manipulation on both
operands. I dont want to hardcode the operator values or use of switch/
if-else statement to determine the operation.
Is there any way to solve this problem ??
(char*)
int myFunc(char* operand1, char* operand2, char* myoperator);
Depending upon the operator, i want to do the manipulation on both
operands. I dont want to hardcode the operator values or use of switch/
if-else statement to determine the operation.
Is there any way to solve this problem ??