Objective-C error... Cannot convert to pointer type (int)
- by Flash84x
I am attempting to use the TouchXML library and followed the example with the following code
for (CXMLElement node in nodes) {
NSMutableDictionary *item = [[NSMutableDictionary alloc] init];
int counter;
for (counter = 0; counter < [node childCount]; counter++ ) {
[item setObject:[[node childAtIndex:counter] stringValue] forKey:[[node childAtIndex:counter] name]];
}
[rst addObject:item];
[item release];
}
The compiler however is complaining about counter and throwing the following error for counter = 0 and both occurances in the setObject call.
Cannot convert to pointer type
Any help with my rusty C/ObjC would be appreciated