Objective-C error... Cannot convert to pointer type (int)
Posted
by Flash84x
on Stack Overflow
See other posts from Stack Overflow
or by Flash84x
Published on 2010-05-14T04:03:08Z
Indexed on
2010/05/14
4:04 UTC
Read the original article
Hit count: 594
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
© Stack Overflow or respective owner