How could I add a and b without using the + symbol, because I am assigning the + symbol in the c variable?
I know how to form an expression using the above data as shown in the code below, but I don’t know how to get the output of that expression using NSExpression.
This is my code:
int a=10;
int b=20;
NSString *c=@"+";
NSString *d=[NSString stringWithFormat:@"%d%@%d",a,c,b];
nslog(@"d=%@",d);//d=10+20
After this, how do I get the answer 30?
1 Answer