I'm doing a tutorial from this book: "Objective-C 2.0 Essentials 3rd edition" by Neil Smyth. I have tried repeatedly but keep getting the same "Expected expression" error even though the books version claims to run. I've checked way too many times and my version is exactly the same as the books. Please, can someone help me. Code below:
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[]) {
@autoreleasepool {
int x;
int j = 54321;
for (x = 0; x < 10; x++) {
}
int j = x + 10;
NSLog (@"Variable j in for loop is %i", j);
NSLog (@"Variable j outside for loop is %i", j); /* I GET AN ERROR STATING " EXPECTED EXPRESSION HERE*/
}
return 0;
}
