我正在尝试学习objective-c,并在此示例中遇到警告:
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[])
{
@autoreleasepool {
NSMutableDictionary *booklisting = [NSMutableDictionary dictionary];
int count; // < Am getting 'unused variable' warning here
[booklisting setObject:@"Wind in the Willows" forKey:@"100-432112"];
[booklisting setObject:@"Tale of Two Cities" forKey:@"200-532874"];
[booklisting setObject:@"Sense and Sensibility" forKey:@"200-546549"];
[booklisting setObject:@"Shutter Island" forKey:@"104-109834"];
NSLog(@"Number of books in dictionary = %lu", [booklisting count]);
有人知道为什么吗?..不胜感激..谢谢