For some reason, I get a compilation error when I try to do the following:
NSLog(@"row: %lu", indexPath.row);
where row
is of type NSUInteger
. The error I get is
Conversion specifies type 'unsigned long' but the argument has type 'NSUInteger' (aka 'unsigned int')
I can do the following with no compilation errors:
NSString * string = [NSString stringWithFormat:@"row: %lu", indexPath.row];
I'm using the exact same format string and substitution argument in both cases, but why does NSLog
freak out while -stringWithFormat:
seems to be perfectly content? My compiler is LLVM 1.6.