I am learning objective-c and as i am trying to pass a parameter to a method RequestExecuteCountLettersForString that accepts data of type NSMutableString i received a warning.
i am passing the textual parameter as follows:
[delegatee RequestExecuteCountLettersForString:@"XYZ"];
and I am receiving this warning:
Incompatible pointer types sending 'NSString *' to parameter of type
'NSMutableString *'
please let me know how to fix this warnign and why i cant pass such textual input to the method.
The literal
@"XYZ"is not anNSMutableString. It's anNSString. That is what the error is telling you.You need to pass an actual mutable string.
Two things:
NSMutableStringinstead ofNSString.