1
例子:const @「SomeString」有什麼特別之處?
FOUNDATION_EXPORT NSString * const NSLocalNotificationCenterType;
什麼是通過類型限定改變?我明白了,如果const
在星號前面是。
例子:const @「SomeString」有什麼特別之處?
FOUNDATION_EXPORT NSString * const NSLocalNotificationCenterType;
什麼是通過類型限定改變?我明白了,如果const
在星號前面是。
*
之後的const
表示指針本身是常量。也就是說,你不能這樣做
NSString *myString = @"abcde";
NSLocalNotificationCenterType = myString;