Came across this example in the book im reading and it didn't make sense at all to me, I'm probably missing something but it seems like youre assigning count with the values '10' and then the value 'x' which isnt even an int. Just wondering if this is a syntax that is valid.
The book says this:
The variables count and x are declared to be integer variables in the normal fashion. On the next line, the variable intPtr is declared to be of type “pointer to int.” Note that the two lines of declarations could have been combined into a single line:
int count = 10, x, *intPtr;
here's the program its taken from:
#import <Foundation/Foundation.h>
int main (int argc, char *argv[ ])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int count = 10, x;
int *intPtr;
intPtr = &count;
x = *intPtr;
NSLog (@"count = %i, x = %i", count, x);
[pool drain];
return 0;
}