iOS中定义常量字符串的问题
大家讲道理
大家讲道理 2017-04-17 12:01:25
0
2
622

有个问题比较疑惑,定义常量字符串的问题,以下代码:
NSString * const kSomeConstantString = @"";
const NSString * kSomeConstantString = @"";有何区别?

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(2)
小葫芦

const type * variable name: you can change the pointer’s pointer, but you cannot change the content pointed to by the pointer.
Type * const variable name: The content pointed to by the pointer can be changed, but the pointing of the pointer cannot be changed.
Reference address

阿神

C language knowledge- - const NSString* const string;

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!