I've recently begun to dabble in Objective C(comming from a background in java. I've been trying to create a function to do the quadratic formula, but I have had a problem with calling it. The function is defined as follows:
The function is called as follows:
where a,b,c, and solu are all float types. I get the error "incompatible types in initialization." I can't figure out for the life of me why this would happen, since I am using float values for everything. Can you guys help me? I appoligize if this is a question too elementary.
Thanks!
Mike
PHP:
-(float)SolveQuadratic :(float)a :(float)b :(float)c
The function is called as follows:
PHP:
float solu = [Quadratic SolveQuadratic :a :b :c];
where a,b,c, and solu are all float types. I get the error "incompatible types in initialization." I can't figure out for the life of me why this would happen, since I am using float values for everything. Can you guys help me? I appoligize if this is a question too elementary.
Thanks!
Mike