Am getting an undeclared identifier problem in my code. Have commented the compiler messages.
Main.m
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[])
{
@autoreleasepool {
NSMutableArray *stocks = [[NSMutableArray alloc]init];
NSMutableDictionary *stock;
stock = [NSMutableDictionary dictionary];
[stock setObject:@"AAPL"
forKey:@"symbol"];
[stock setObject:[NSNumber numberWithInt:200]
forKey:@"shares"];
[stocks addObject:stock];
stock = [NSMutableDictionary dictionary];
[stock = setObject:@"GOOG" // use of undeclared identifier setObject
forKey:@"symbol"];
[stock = setObject:[NSNumber numberWithInt:160] // use of undeclared identifier setObject
forKey:@"shares"];
[stocks addObject:stock];
[stocks writeToFile:@"/tmp/stocks/plist"
atomically:YES];
}
return 0;
}