[C and pointer] # if 0 # end if

Source: Internet
Author: User

1. The role of "# if 0/# if 1... # endif" is 1) the code defined in the code is the code of some debugging versions. At this time, the code is completely ignored by the compiler. If you want the code to take effect, you only need to change # if 0 to # if 1 2) # if 0 is also used as a comment. if the program you want to comment on is very long, at this time, # if 0 is the best, so that no mistakes are made # if 1 can make the variables in it a local variable. 3) This structure indicates the code you wrote earlier. If you don't want to delete it, you can use this method, which is more convenient than annotation. 2. Example [html] # include <iostream> int main (void) {int a = 0; # if 0 a = 1; # endif printf ("% d \ n ", a); return 0 ;}

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.