Hi there,
Just starting out learning objective C, and i tried to make a simple code for starters, however on every "NSLog" line it says "expected expression" and i can not figure out why. On the line "Hello World", it also says "Implicit declaration of function "NSLog" is invalid in C99".
Also, if anyone has any good tutorials they know of for me to learn it would be appreciated, thank you.
Just starting out learning objective C, and i tried to make a simple code for starters, however on every "NSLog" line it says "expected expression" and i can not figure out why. On the line "Hello World", it also says "Implicit declaration of function "NSLog" is invalid in C99".
Code:
int main(int argc, const char * argv[])
{
int a;
int b;
int c;
a = 1;
b = 2;
c = a + b;
NSLog(@"Hello World");
NSLog(@" a + b = %i", c);
NSLog(@" a + b = %i", a + b);
NSLog(@" a = %i", a);
NSLog(@" b = %i", b);
return 0;
}
Also, if anyone has any good tutorials they know of for me to learn it would be appreciated, thank you.