iphone - Invalid operands to binary expression ('double' and 'double') objective-c issue -
invalid operands binary look ('double' , 'double') objective-c issue
-(double)performoperationwith:(double *)operand1 and:(double *)operand2 { double result = 0.0; result = operand1 + operand2; homecoming result; }
they're pointers, should dereference them:
result = *operand1 + *operand2; or alter function parameters:
-(double)performoperationwith:(double )operand1 and:(double )operand2 {...} iphone ios objective-c
No comments:
Post a Comment