参考文档地址:http://www.cnblogs.com/dzry/archive/2011/05/12/2044835.html
int
a[
5
]
=
{
1
,
2
,
3
,
4
,
5
};
int * p = a;
int ** point = & p;
int * p = a;
int ** point = & p;
出point指针中存放的是p指针的地址。
而p指针中存放的是a[0]的地址。所以*point和p是一样的。
*p是取p中存放的地址
*point=p
**point和a[0]是等价的,前者可以写成*p,
**point 等于 a[0]
#import <Foundation/Foundation.h>
void changeC(char *d) {
*d = 9;
}
void changeStr(NSString * *str2) {
*str2 = @"123";
}
int main(int argc, const char * argv[])
{
@autoreleasepool {
// char c = 10;
//
// changeC(&c);
//
// NSLog(@"%i", c);
NSString * str = @"456";
changeStr(&str);
NSLog(@"%@", str);
}
return 0;
}