Incompatible Types in Initialization
Posted
by
jack
on Stack Overflow
See other posts from Stack Overflow
or by jack
Published on 2010-12-25T14:19:14Z
Indexed on
2010/12/25
14:54 UTC
Read the original article
Hit count: 224
objective-c
|types
I have the following code in a subroutine that produces an incompatible types in initialization error on the varVal library in the subroutine evaluateExpression:
NSDictionary *varVal;
for (int i=0; i<varCount; i++) {
[varVal setObject:[(i+1)*2 stringValue] forKey:[i stringValue]];
}
double result =[[self brain] evaluateExpression:[[self brain] expression]
usingVariableValues:varVal];
My subroutine declaration in the brain.h file is:
+(double)evaluateExpression:(id)anExpression
usingVariableValues:(NSDictionary *)variables;
I'd appreciate any help.
© Stack Overflow or respective owner