I am trying to create a simple integer variable and can't get it to accept a value.
Why does the NSLog print out i=(null)
?
int i;
i = 0;
NSLog(@"i=%@", i);
How do I create a simple index for an array?....
Thank you...
I am trying to create a simple integer variable and can't get it to accept a value.
Why does the NSLog print out i=(null)
?
int i;
i = 0;
NSLog(@"i=%@", i);
How do I create a simple index for an array?....
Thank you...
You are creating the integer just fine, the problem is you cannot output it like that. %@ is used to output objective c objects, not simple c types.
try:
int i;
i=0;
NSLog(@"i=%d",i);