views:

589

answers:

1

This error message had me stumped for a while:

invalid conversion from 'objc_object*' to 'int'

the line in question was something like this:

int iResult = [MyUtils utilsMemberFunc:param1,param2];

+3  A: 

It doesn't matter what the "to" type is, what is important is that you recognize that this message, in this context, is reporting that the utilsMemberFunc declaration was not found and due to objective-c's dynamic binding it is assuming it returns an objc_object* rather than the type that utilsMemberFunc was declared to return. So why isn't it finding the declaration? Because ',' is being used rather than ':' to separate the parameters.

AlanKley