) Oc static extern and const, ocextern

Source: Internet
Author: User

(To) oc static extern and const, ocextern

Static global, which can be changed. If static is declared in a class, the change volume is also used when it is used elsewhere in the class. Similar to java, but cannot be accessed directly using the class name. Const is a constant and cannot be changed to extern 1. if meString has been declared in other Class a and you want to use this variable in another class B, you can use extern NSString * meString; to get the same value in Class, and can be assigned again. (For more information, see click open link. For more information, see click open link. 2. it is the literal meaning of the external, not the extension. If the external is not defined, it cannot be used. Of course, there is another use of extern "c", which is the access method. 3. OS development uses extern to access global variables. For details, refer to: Click to open the link. const is a constant and cannot be changed. h extern NSString * const SIAlertViewWillDismissNotification ;. m NSString * const SIAlertViewWillDismissNotification = @ "SIAlertViewWillDismissNotification"; static global, which can be changed. If static is declared in a class and used elsewhere in the class, it is also the amount of changes used. Similar to java, but cannot be accessed directly using the class name. Const is a constant and cannot be changed to extern 1. if meString has been declared in other Class a and you want to use this variable in another class B, you can use extern NSString * meString; to get the same value in Class, and can be assigned again. (For more information, see click open link. For more information, see click open link. 2. it is the literal meaning of the external, not the extension. If the external is not defined, it cannot be used. Of course, there is another use of extern "c", which is the access method. 3. OS development uses extern to access global variables. For details, refer to: Click to open the link. const is a constant and cannot be changed. h extern NSString * const SIAlertViewWillDismissNotification ;. m NSString * const SIAlertViewWillDismissNotification = @ "SIAlertViewWillDismissNotification ";

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.