Scope of #define preprocessor in C

前端 未结 6 1825
孤街浪徒
孤街浪徒 2020-12-09 09:19

The scope of #define is till the end of the file. But where does it start from. Basically I tried the following code.

 #include
          


        
6条回答
  •  有刺的猬
    2020-12-09 09:52

    The scope of a #define is from the occurrence, to the end of the file (or a corresponding #undef), regardless of any intervening C scopes.

提交回复
热议问题