It all clicked tonight, thanks Lee and chown33 for the pointers on pointers... I do have one question about this code which functions fine.
In my NSLog statement I end with '*point, point', the first number 25 is of course the value and the second number I was trying to print the address of value NUM. This is the statment that it returned after exicuting.
Is it safe to say that that is the address in memory where the variable NUN is allocated? (I hope I got my syntax right).
-Lars
Code:
#import <Foundation/Foundation.h>
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int num;
int *point;
num = 25;
point = #
NSLog(@"point value is %i, and the address is %i", *point, point);
[pool drain];
return 0;
}
In my NSLog statement I end with '*point, point', the first number 25 is of course the value and the second number I was trying to print the address of value NUM. This is the statment that it returned after exicuting.
Code:
2010-09-03 22:04:23.992 pointer_test1[16911:10b] point value is 25, and the address is -1073744172
Is it safe to say that that is the address in memory where the variable NUN is allocated? (I hope I got my syntax right).
-Lars