I am wondering what the exclamation mark in if(!anObject)
means.
If it always adds, then your string is never "+".
The logic as you have it will always add a+b unless the txtOperator.txt is exactly equal to @"+".
Interestingly if you did pass a plus it would always subtract, only the first two cases would ever be hit because if the first was not true the second always would be.
Basically, take out all the "!"....